mirror of
https://github.com/sbrow/nu-ffmpeg.git
synced 2025-12-29 16:23:11 -05:00
fix: Updated nushell version.
This commit is contained in:
10
ffmpeg.nu
10
ffmpeg.nu
@@ -82,8 +82,8 @@ export def "parse filter" [
|
||||
]: string -> table<name: string params: table<param: string, value: string>> {
|
||||
parse --regex '^\s*(?:\[(?<input>[^\s]+)\]\s*)?(?<name>[^=\s\[]+)\s*(?:=(?<params>[^\[\s,;]*)\s*)?(?:\[(?<output>[^\s,;]+)\])?' | first | update params {
|
||||
parse --regex `(?:(?<param>[^=]+)=)?(?<value>[^:]+):?`
|
||||
} | update input { split row '][' | filter { is-not-empty }
|
||||
} | update output { split row '][' | filter { is-not-empty } }
|
||||
} | update input { split row '][' | where { is-not-empty }
|
||||
} | update output { split row '][' | where { is-not-empty } }
|
||||
}
|
||||
|
||||
# TODO: Remove export
|
||||
@@ -95,7 +95,7 @@ def "filterchain to-string" []: table -> string {
|
||||
$in | each { filter to-string }| str join ','
|
||||
}
|
||||
|
||||
def "filter to-string" []: record<input: list<string> name: string params: table<name: string value: string> output: list<string>> -> string {
|
||||
def "filter to-string" []: record<input: list<string> name: string params: table<param: string value: string> output: list<string>> -> string {
|
||||
$in | update input {
|
||||
str join ']['
|
||||
} | update output {
|
||||
@@ -176,7 +176,3 @@ export def append-complex-filter [
|
||||
(complex-filter --input $input --output $output $name $params)
|
||||
]
|
||||
}
|
||||
|
||||
def is-not-empty []: any -> bool {
|
||||
is-empty | not $in
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user