global/zsh: add disget and disgetconv functions
This commit is contained in:
parent
b29f007e69
commit
6d48d41d33
1 changed files with 13 additions and 0 deletions
|
@ -105,6 +105,19 @@
|
|||
|
||||
ffmpeg -i "$file" -vcodec copy -af "$filters" "$@"
|
||||
}
|
||||
|
||||
disget() {
|
||||
curl "$1" --output ''${$(basename "$1")%%\?*}
|
||||
}
|
||||
|
||||
disgetconv() {
|
||||
url="$1"
|
||||
tmpFileName="''${$(basename "$url")%%\?*}.XXX"
|
||||
tmpFile=$(mktemp -t $tmpFileName)
|
||||
curl "$url" --output "$tmpFile"
|
||||
shift 1
|
||||
magick "$tmpFile" "$@"
|
||||
}
|
||||
'';
|
||||
|
||||
dotDir = ".config/zsh";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue