summaryrefslogtreecommitdiffstats
path: root/bin/rand-music
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-10 14:41:38 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-10 14:43:14 -0500
commit09366721b4a5405ccd24e21c9f0c4edd25d51196 (patch)
treefd72dec2d55f51aecc1b76b01dd7ed18c1be9d87 /bin/rand-music
parent12d2a797346af8fc2908bf5d7873414811a7e9cc (diff)
downloadconf-09366721b4a5405ccd24e21c9f0c4edd25d51196.tar.gz
conf-09366721b4a5405ccd24e21c9f0c4edd25d51196.zip
various script cleanups
Diffstat (limited to 'bin/rand-music')
-rwxr-xr-xbin/rand-music13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/rand-music b/bin/rand-music
new file mode 100755
index 0000000..6e9bccc
--- /dev/null
+++ b/bin/rand-music
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -eu
+set -o pipefail
+
+if [ "${1:-}" = '--old' ]; then
+ extra_args="--exclude yearly --include all"
+ shift
+else
+ extra_args=
+fi
+
+lastfm-query sync doyster
+lastfm-query recommend --random --album $extra_args "${1:-20}"