Files
etc
home
default
.config
.fonts
.local
scripts
append-urls-to-titles
backup-archive
booksplit
create-playlist
del-macos-folders
generate-mpd-playlists
git_log_alias
hash-filenames
list-packages
mp3-to-opus
package-list
phoenix
proverb
record-screen
remove-exif
restart-bluetooth
restart-music
screenshot
scrub-ufw
sort-by-length
tag
titles-to-youtube-playlist
update-mirrors
update-mpd
update-nonsystem
wget-titles-from-urls
youtube-archive
youtube-archive-audio
youtube-audio
.bashrc
.profile
.tool-versions
.gitignore
preview.png
readme.md
dotfiles/home/default/scripts/append-urls-to-titles
2021-11-29 12:59:03 -05:00

24 lines
512 B
Bash
Executable File

#!/usr/bin/env sh
set -eou pipefail
# Old script to get json url for some reason? Don't know why I did this
# youtube-dl -j --flat-playlist -a - | \
# jq -r '.id' | \
# sed 's_^_https://youtu.be/_' | \
# wget-titles-from-urls >> titles.txt
test -f append.txt
if [[ $? -ne 0 ]]; then
echo No append.txt found! Cannot append
exit
fi
if [[ ! -s append.txt ]]; then
echo append.txt is empty
exit
fi
cat append.txt | wget-titles-from-urls >> titles.txt
cat append.txt | youtube-audio
> append.txt