0
I am editing my question for clarification... I am sorry for any confusion... The Conky syntax has changed with the latest version (I assumed users of the latest version of Conky was aware of that).
My Problem Clarified:
I create an xml file that takes weather information from Wunderground.com.
I would prefer to find a simple way to extract specific information out of the xml file to display in Conky (including the weather icon).
Most information I have found so far does not do what I need, and I can't cobble together my own solution from what I have found because the information seems needlessly complex. I want the method used to not require a lot of extra programs and/or scripting gymnastics.
Example:
I use "curl -s http://api.wunderground.com/api/[key]/conditions/q/TX/[mycity].xml -o ~/path/weather.xml" to create my xml file using Wunderground.com.
Within the xml file is the path to the current weather's icon (Let us say: "http://icons.wxug.com/i/c/k/cloudy.gif")
Within the xml file is specific data I want to display, such as the current temperature (the xml files shows '<'temp_f'>'68.9'<'/temp_f'>'"... Note: I am using '<' otherwise my post won't show the tag). Therefore, I would like to take the 68.9 and display it (or round it to 69).
In the end, using the example above, my Conky would then show a "Cloudy" Icon, and 69F (or 68.9F). I could then (easily I hope) extract and display other information in a similar fashion.
Thank you in advance for any help you can offer.
1We are not actually aware.... – Ramhound – 2017-09-27T22:39:24.070
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. – Ramhound – 2017-09-27T22:41:11.860
I found an answer to part of my question. To extract the specific information I want, I simply do as follows: curl http://api.wunderground.com/api/%5Bkey%5D/conditions/q/TX/%5Bmycity%5D.xml | awk -F'[<|>]' '/<temp_f>/ {print "Current Temperature:"$3}/<windchill_f>/ {print "Windchill:"$3}'
– Curtis – 2017-10-08T02:21:43.650I now need an answer to the other part of my question... how do I get conky to display the current weather icon from the url found in the tag '<icon_url>'. The url will change as the weather changes. – Curtis – 2017-10-08T02:25:38.123