Skip to content

Commit

Permalink
Lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
holman committed Feb 19, 2012
1 parent 42f721b commit fdb4eb4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/lyrics
@@ -0,0 +1,15 @@
#!/bin/bash
#
# lyrics.sh
#
# A fine piece of work by @febuiles
# https://gist.github.com/1549979

artist_name=`arch -i386 osascript -e'tell application "iTunes"' -e'get artist of current track' -e'end tell'`
song_title=`arch -i386 osascript -e'tell application "iTunes"' -e'get name of current track' -e'end tell'`

artist=`echo $artist_name | sed "s/[[:space:]]/%20/g"`
title=`echo $song_title | sed "s/[[:space:]]/%20/g"`
song=`curl -s "http://makeitpersonal.co/lyrics?artist=$artist&title=$title"`

echo -e "$artist_name - $song_title\n$song" | less

0 comments on commit fdb4eb4

Please sign in to comment.