utils upgrade
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
# Download music from Youtube or Youtube Music
|
||||
# and save as top quality flac file without video
|
||||
@@ -6,6 +7,25 @@
|
||||
# Usage: $ ytmusic https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
||||
# More info: https://github.com/ytdl-org/youtube-dl
|
||||
|
||||
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
|
||||
cat <<EOF
|
||||
Usage: $(basename "$0") [-h] <url>
|
||||
|
||||
Download music from YouTube or YouTube Music as FLAC.
|
||||
|
||||
Options:
|
||||
-h, --help Show this help message
|
||||
|
||||
Arguments:
|
||||
url YouTube or YouTube Music URL (playlist or video)
|
||||
|
||||
Output:
|
||||
$HOME/ytmusic/<playlist>/<channel> - <title>.flac
|
||||
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DEST_PATH="${HOME}/ytmusic"
|
||||
mkdir -p "${DEST_PATH}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user