From 25cd8380f802b069f95d9514563aa2a083176925 Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Mon, 15 May 2017 14:32:03 +0200 Subject: Add prompt and other conf.d --- conf.d/99-youtube-dl.zsh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 conf.d/99-youtube-dl.zsh (limited to 'conf.d/99-youtube-dl.zsh') diff --git a/conf.d/99-youtube-dl.zsh b/conf.d/99-youtube-dl.zsh new file mode 100644 index 0000000..8e572a5 --- /dev/null +++ b/conf.d/99-youtube-dl.zsh @@ -0,0 +1,20 @@ +function download_audio() { + youtube-dl \ + --extract-audio --audio-format vorbis --audio-quality 0 --no-call-home \ + --restrict-filenames --ignore-errors --add-metadata $@ +} + +function rip() { + if [ "$#" -ne 1 ]; then + download_audio $(xclip -o) + else + download_audio $@ + fi +} + +function ripto() { + mkdir $1 + pushd $1 + rip $2 + popd +} -- cgit v1.2.3