#!/bin/bash

# wminfo plugin: Pitchfork best new albums

# command: wminfo -p pitchfork.wmi -b#ef4135 -f#ffffff

lynx --source localhost/wminfo/pitchfork.html | \
	grep 'score bnm score' | \
	perl -pe 's/\n/ /g' | \
	perl -pe 's/<h1> More/\n<h1> More/g;s/<\/span>/<\/span>\n/g' | \
	grep '<h1> More' | \
	perl -pe 's/<h1>/\n<h1>/g' | \
	grep 'score bnm score' | \
	perl -pe 's/<h4>.*<\/h4>//' | \
	perl -pe 's/<\/h1> <h2>/ - /;s/<span.*?> /(/;s/ <\/span>/)/' | \
	perl -pe 's/<.*?>//g;s/ +/ /g'
echo
