.dotfiles/.scripts/ytdl-song-upload.sh
2025-01-14 04:57:34 -03:00

8 lines
216 B
Bash
Executable File

mkdir ~/.tmp
cd ~/.tmp
clipboard=$(xclip -o)
output=$(yt-dlp --extract-audio --audio-format mp3 "$clipboard")
filename=$(echo "$output" | grep -oP '(?<=Destination: ).+\.mp3')
catboxupload "$filename"
rm "$filename"