some aliases moved to utils

This commit is contained in:
2026-02-17 16:16:08 +08:00
parent 94df267831
commit 0d7feada81
5 changed files with 86 additions and 125 deletions

19
utils/.local/bin/ytmusic Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Download music from Youtube or Youtube Music
# and save as top quality flac file without video
# Playlist and video/track URLs are supported
# Usage: $ ytmusic https://www.youtube.com/watch?v=dQw4w9WgXcQ
# More info: https://github.com/ytdl-org/youtube-dl
DEST_PATH="${HOME}/ytmusic"
mkdir -p "${DEST_PATH}"
youtube-dl \
--extract-audio \
--audio-format flac \
--audio-quality 0 \
--format bestaudio \
--write-info-json \
--output "${DEST_PATH}/%(playlist_title)s/%(channel)s - %(title)s.%(ext)s" \
"$@"