Last active
March 16, 2023 23:25
-
-
Save avrahamappel/e7fbeaee66c7cec479ad3a69548c163d to your computer and use it in GitHub Desktop.
Download shiur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#! nix-shell -i bash -p yt-dlp | |
# | |
# Download shiur from [Rabbi Uri Lati's YouTube channel](https://www.youtube.com/@UriLati) and convert it into something | |
# [my phone's podcast player](https://www.kaiostech.com/store/apps/?bundle_id=com.kaiostech.podkast) can use | |
usage () { | |
echo "USAGE:" | |
echo "uri-lati-dl.sh <url>" | |
} | |
if [[ "$#" -lt 1 ]] | |
then | |
usage | |
exit 0 | |
fi | |
FILE_PATH="$HOME/Downloads/3387161_8b039c97df607c478fae3644ad4c561a305063d0.mp3" | |
url="$1" | |
rm "$FILE_PATH" | |
yt-dlp -x --audio-format=mp3 -o "$FILE_PATH" "$url" | |
# Open the Downloads folder so we can manually drag the file to Android File Transfer | |
open "$HOME/Downloads" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment