Skip to content

Instantly share code, notes, and snippets.

@Kevin-Prichard
Created January 29, 2024 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kevin-Prichard/5159f789afd1294f5d7a58eb95894a08 to your computer and use it in GitHub Desktop.
Save Kevin-Prichard/5159f789afd1294f5d7a58eb95894a08 to your computer and use it in GitHub Desktop.
Extract audio for on-the-go listening: #bash #TermUX #Android
#!/usr/bin/env bash
BASE=~/storage/change_me1
DEF_COLLEC_NAME=change_me2
IFS="?"
read -ra url <<< "$1"
if [ "$2" == "" ]; then
cd $BASE/$DEF_COLLEC_NAME
else
[[ ! -e $BASE/$2 ]] && mkdir $BASE/$2
cd $BASE/$2
fi
yt-dlp -f 140 ${url[0]}
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment