Bushfire danger forecast in conky

The Australian Bureau of Meteorology publishes daily forecasts of bush fire danger on its web and ftp sites. I live in an area with very high fire danger during the summer months, and I need to be aware of the forecast bushfire risk. I devised this simple bash script (called fire.sh), which grabs the local weather forecast, strips out the required information and returns it.

#! /bin/bash
#BOM weather forecast for Yarra Glen
  URL=ftp://ftp2.bom.gov.au/anon/gen/fwo/IDV10729.txt
#Get the data from the web
  DATA=$(curl -s $URL)
#strip out the fire danger rating line from the raw text
  FIREDANGER=$(echo "$DATA" | grep -A1 'Fire Danger')
#print the fire danger forecast
  echo $(echo "$FIREDANGER")

Displaying this information on my computer’s desktop using conky,  is accomplished by adding the following line to my .conkyrc file:

${execi 4000 /home/michael/Scripts/fire.sh}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s