Some time ago I wrote a php script for a local fire brigade's page that parses the local government's 'Venting Index' page each day and tells folk if they can have open fires or not. It runs as a cron job once a day and outputs a page of html that is included in their site.
I am using Conky at home, (Mint maya on a Mint BoxPro) and thought to add the info in my desktop conky. So I altered my php to write the data to another file which I then access in Conky thus:
Code: Select all
${offset 240}${color cyan}VENTING INDEX:
${offset 240}${color yellow}${exec cat 30 /var/www/path_to/VI.txt}
Code: Select all
Today 7am: No Burning
Today 4pm: No Burning
Tomorrow 7am: Burning Permitted
Making my VI.txt now look like
Code: Select all
${color red}Today 7am: No Burning
${color red}Today 4pm: No Burning
${color green}Tomorrow 7am: Burning Permitted
${color red}Today 7am: No Burning
${color red}Today 4pm: No Burning
${color green}Tomorrow 7am: Burning Permitted
When I want Conky to display:
Today 7am: No Burning
Today 4pm: No Burning
Tomorrow 7am: Burning Permitted
I've been trying to see how Conky can parse Conky Variables in an external file and act on it's content rather than just echo it out on the screen but am hitting a wall... Is it possible? Or, if not, can someone please point me at a how to?
Thanks..
(Venting Index info for anyone interested..) The Venting Index is a term used in air pollution meteorology. (It is also known as the Ventilation Index.) The Ventilation Index is a numerical value related to the potential of the atmosphere to disperse airborne pollutants, such as smoke from a fire. It is based on both the current wind speed in the mixed layer and the mixing height. The mixed layer is the surface layer of air that is turbulent and well mixed. The mixing height is the thickness (sometimes zero) of this mixed layer.
Stronger wind speeds and thicker mixed layers will produce higher venting indexes. For convenience, the Ventilation Index is converted to a scale of 0 to 100. On this scale, the capacity of the atmosphere to disperse pollutants is related to the following Ventilation Index values:
Ventilation Category
0 - 33 POOR ventilation
34 - 54 FAIR ventilation
55 - 100 GOOD ventilation
The Ministry of Environment's Venting Index (In Canada) contains smoke-control forecasts for the current and following day, as well as archived smoke-control forecasts for the last several years. If the Ventilation Index indicates POOR or FAIR, then smoke that results from burning will tend to build up, causing air pollution. To avoid such pollution, outdoor burning is restricted when the index is POOR or FAIR.