I have an old v1 extension that I used to get feedback on the London Tube network. It ran a script and outputted to Growl. Its very useful for getting an up to date status of the network.
I am trying to convert it into v2 workflow and have managed to output the text to notification centre, however, the code only shows 2 lines. How do I convert this to show all subway lines in the alfred window and not in notification centre?
Script is here (sorry I copied it from a web site somewhere and have lost the original creators address)
RESULT=$(curl -s "http://api.tubeupdates.com/?method=get.status&lines=all&format=xml" | cat | awk '/<status>/')
for index in Bakerloo Central Circle District DLR Jubilee Metropolitan Northern Piccadilly Victoria Waterloo
do
RESULT=$(echo $RESULT | sed "s/<status>/$index: /1" | sed "s/<\/status> /\\\n/g" | sed "s/<\/status>//g")
done
echo -e -n $RESULT
Thanks
gr4z