utils upgrade

This commit is contained in:
2026-02-21 18:10:09 +08:00
parent f4c500d6cd
commit 153776c54e
31 changed files with 608 additions and 95 deletions

View File

@@ -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}"