[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Hi All, As a little diversion I'm looking at presenting information from Aurorawatch API on conky. Got somewhere but my programming skills now find me lacking... So in .conkyrc file I have the following ${execi 300 grep "state" ~/.cache/conky-vision/aurora2.xml | grep -o "name=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | awk 'NR==1' | tr '[a-z]' '[A-Z]'}\ form the file aurora2.xml whose contents show <aurorawatch> <current> <state name="green" value="0" color="#33ff33">No significant activity</state> </current> <previous> <state name="yellow" value="50" color="#ffff00">Minor geomagnetic activity</state> </previous> <station>SAMNET/LAN2. Lancaster, UK.</station> <updated>2018-12-07 08:45:32</updated> </aurorawatch> This displays "GREEN" (or whatever the status is... I would simply like to display the last information on that line "No significant activity" Any help with this would be gratefully received. Thanks Anthony
|
-- The Mailing List for the Devon & Cornwall LUG https://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq