Add download audio/video scripts

This commit is contained in:
Thomas Dehaeze 2019-05-30 16:22:37 +02:00
parent 8feb70b804
commit 9ba11f905b

View File

@ -283,3 +283,35 @@ http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
xclip -o -selection primary | xclip -o -selection clipboard -i
emacsclient -ne '(org-capture "" "Q")' && dunstify "Emacs" "Text Successfully Captured"
#+end_src
* Download-Audio
:PROPERTIES:
:header-args: :tangle ~/scripts/download-audio.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
if [ $TMUX ]; then
tmux split -v -l 1 "cd ~/Downloads/ && youtube-dl --add-metadata -xic -f bestaudio/best $1" && tmux select-pane -U
else
cd ~/Downloads/;
setsid nohup youtube-dl --add-metadata -xic -f bestaudio/best $1 &> /dev/null &
fi
#+end_src
* Download-Video
:PROPERTIES:
:header-args: :tangle ~/scripts/download-video.sh
:header-args+: :comments both :mkdirp yes
:header-args+: :shebang "#!/usr/bin/env bash"
:END:
#+begin_src bash
if [ $TMUX ]; then
tmux split -v -l 1 "cd ~/Downloads/ && youtube-dl --add-metadata -ic $1" && tmux select-pane -U
else
cd ~/Downloads/;
setsid nohup youtube-dl --add-metadata -ic $1 &> /dev/null &
fi
#+end_src