Skip to content

Instantly share code, notes, and snippets.

@jjrh
Created August 22, 2013 15:12
Show Gist options
  • Save jjrh/6308485 to your computer and use it in GitHub Desktop.
Save jjrh/6308485 to your computer and use it in GitHub Desktop.
tool for mpd that formats the output of mpc in a way I can remember it. If I like a song in my playlist dump its name and file location into $file_path
#!/bin/sh
# tool for mpd that formats the output of mpc in a way I can remember it.
# If I like a song in my playlist dump its name and file location into $file_path
#
file_path="~/temp/good_songs"
echo "--------------------------------------------------------------------------------" >> $file_path # note this line is 80characters wide.
SONG_INFO=`mpc status -f "%artist% - %title% \n%file%" | head -1`
SONG_LOCATION=`mpc status -f "%artist% - %title% \n%file%" | head -2 | tail -n -1`
echo $SONG_INFO >> $file_path
echo $SONG_LOCATION >> $file_path
echo "Bumping track?"
echo $SONG_INFO
echo $SONG_LOCATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment