commit 864d71dad697d3f18ed8671ea05df6ef80fda5df
parent 7050f042eaaf2de7ad82a814620656b585fbc610
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 4 Jun 2018 10:34:12 -0400
Rename GFDL window in tmux, improve playlist item names and ordering
Diffstat:
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/links/bin/gfdl-ssh b/links/bin/gfdl-ssh
@@ -1,5 +1,6 @@
#!/bin/bash
# for tput commands: see `man 5 terminfo`
+tmux rename-window gfdl
echo "$(tput setaf 1)## Make sure to connect to Princeton VPN (Connect\ Tunnel.app) first ##$(tput sgr0)"
pass -c Uni/noaa-rsa-pin
echo "$(tput setaf 2)# Paste passphrase from clipboard (Cmd-v) + 6 RSA fob digits$(tput sgr0)"
diff --git a/links/bin/youtube-dl-music-playlist.sh b/links/bin/youtube-dl-music-playlist.sh
@@ -19,6 +19,7 @@ $prefix youtube-dl \
--extract-audio \
--audio-quality 0 \
--audio-format mp3 \
+ --output "%(playlist_index)s-%(title)s.%(ext)s" \
"$1"
read -p "add metadata? [y/N] " -n 1 -r
@@ -36,7 +37,9 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
echo -e "\033[0;31m$f\033[0m"
- read -r -p "song: " song
+ song=$(echo "$f" | sed 's/.*-//' | sed 's/^ //' | sed 's/\.mp3//')
+ read -r -p "song [$song]: " input
+ song="${input:-$song}"
read -r -p "track [$track]: " input
track="${input:-$track}"