From 45bb0d11161b1c5077a1415eed6dbd0fd25ccb6a Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 20 Sep 2024 14:16:56 +0200 Subject: Change dotfiles structure, and add guix-channels declaration. --- files/.bin/download_music.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 files/.bin/download_music.sh (limited to 'files/.bin/download_music.sh') diff --git a/files/.bin/download_music.sh b/files/.bin/download_music.sh new file mode 100755 index 0000000..e3a3601 --- /dev/null +++ b/files/.bin/download_music.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +BOLD="\e[1"; +ENDCOLOR="\e[0m"; +Green="32"; +LightRed="31"; + +if ! [ $1 ]; then + echo "" + echo -e $BOLD";"";"$LightRed"m Please provide music url!"$ENDCOLOR + echo "" + exit +fi + +MUSIC_DIR="~/Documents/Music/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" +if [ $2 ]; then + MUSIC_DIR="${a}/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" +fi + +echo "" +echo -e $BOLD";"";"$Green"m Music will download to ${MUSIC_DIR} directory!"$ENDCOLOR +echo "" + +sleep 1 + +yt-dlp -x --audio-format mp3 --embed-metadata -o $MUSIC_DIR $1 -- cgit v1.2.3