Skip to content

Instantly share code, notes, and snippets.

@ckiee
Created June 21, 2021 13:36
Show Gist options
  • Save ckiee/c4efc3776961a79b9c2def90ebb17ab9 to your computer and use it in GitHub Desktop.
Save ckiee/c4efc3776961a79b9c2def90ebb17ab9 to your computer and use it in GitHub Desktop.
Gets all songs that the Cantata MPD frontend has marked as 5 stars (`rating=10`)
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p mpc_cli gnugrep
set -euo pipefail
cd ~/Music/flat #<-- Change me
for f in *; do
if mpc sticker "$f" get "rating" 2>/dev/null | grep -E "=10$" >/dev/null; then
echo "${f%.*}"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment