All pastes #992544 Raw Edit

Someone

public text v1 · immutable
#992544 ·published 2008-04-21 22:03 UTC
rendered paste body
#!/bin/bash
mpclabel=`mpc | sed -n 1p | grep -v '^volume'`
echo $mpclabel | grep '^Permanent Waves'
if [[ $? -eq 0 ]] ; then
  $mpclabel = `curl http://www.cin3ma.tv/permanent_waves/live_playlist/songinfo-56.php?afl=1 | 9 awk '
    function parseline(input,      arrayone, arraytwo){
      split(input, arrayone, ":")
      split(arrayone[2], arraytwo, "<")
      return arraytwo[1]
    }
    /Title/ {title=parseline($0)}
    /Album/ {album=parseline($0)}
    /Composer/ {composer=parseline($0)}
    END {print title, " |" , album, " |", composer}'`
fi
echo $mpclabel > ~/.wmii-3.5/plugins/mpc_info