diff options
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -35,6 +35,10 @@ export EDITOR=vim # openai keys source $HOME/Documents/sync/openai_key +# completion for beets +# from https://wiki.archlinux.org/title/Beets +eval "$(beet completion)" + # aliases alias pacget="pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S" alias pacdel="pacman -Qq | fzf --multi --preview 'pacman -Qi {1}' | xargs -ro sudo pacman -Rns" @@ -312,3 +316,15 @@ append_to_masterlist() { # export LS_COLORS="$LS_COLORS:di=1;33" # Install Ruby Gems to ~/gems export GEM_HOME="$HOME/gems" + + +# get best audio of YouTube file or playlist (just use the right URL) +ytmp3 () { + if [ -z "$1" ]; then print "I need a valid YouTube URL.\n"; fi + cd ~/Downloads/music && yt-dlp -f 'ba' -x --audio-format mp3 "$1" -o '%(title)s.%(ext)s' && cd - || return +} + +ytmp3-split-to-chapters() { + if [ -z "$1" ]; then print "I need a valid YouTube URL.\n"; fi + yt-dlp -f 'bestaudio' -x --audio-format mp3 --split-chapters -o '%(title)s.%(ext)s' "$1" && cd - || return +} |