artagnon (owner)

Revisions

gist: 219817 Download_button fork
public
Description:
fetchlyrics.sh
Public Clone URL: git://gist.github.com/219817.git
Embed All Files: show embed
fetchlyrics.sh #
1
2
3
4
5
6
7
8
9
10
#-*- Mode:sh -*-
#!/bin/sh
listindex=`head -n 1 "$HOME/.plait/status"`
np=`awk '{if(NR==n) print $0}' n=$listindex $HOME/.plait/plaiter.m3u`
np=${np#"/home/artagnon/music"/}
artist=${np%%/*} # First string before /
track=${np##*/} # Last string after /
track=${track%%.*} # remove extension
track=${track#* } # remove number
perl $HOME/bin/LeoLyrics.pm "$artist" "$track"