~seirdy/mpd-scripts

9afc39658c9eb6121c052714eabfbee216586452 — Rohan Kumar 4 months ago 2207415
mpd-upload-favs: upload to new seirdy.one website

ALso upload favorite tracks to my new personal website and gemini
capsule, seirdy.one
1 files changed, 5 insertions(+), 3 deletions(-)

M smart-playlists/mpd-upload-favs
M smart-playlists/mpd-upload-favs => smart-playlists/mpd-upload-favs +5 -3
@@ 3,6 3,7 @@
# Uploads a formatted list of my favorite tracks to https://envs.net/~seirdy/music.txt
# by default it only lists tracks I've rated 8 or higher

set -e
# shellcheck disable=SC2016
playlist() {
	date -u +"# last updated %Y-%m-%dT%H:%M:%S%:z"


@@ 10,8 11,9 @@ playlist() {
		| sed -e "s#^#$HOME/Music/#g" \
		| xargs -d '\n' exiftool -q -p '$Artist - $Title' \
		| sort
	echo "generated playlist" 1>&2
}
playlist "${1:-8}" | ssh seirdy@envs.sh \
	tee /home/seirdy/public_html/music.txt /home/seirdy/public_gopher/music.txt /home/seirdy/public_gemini/music.txt

playlist "${1:-8}" | pee \
	'ssh seirdy@envs.net tee /home/seirdy/public_html/music.txt /home/seirdy/public_gemini/music.txt >/dev/null' \
	'ssh deploy@seirdy.one tee /var/www/seirdy.one/music.txt /srv/gemini/seirdy.one/music.txt'
# vi:ft=sh