about Weather
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

[Solved] about Weather

3 Posts
2 Users
0 Reactions
1,134 Views
(@shuttle3000)
New Member Registered
Joined: 9 months ago
Posts: 2
Topic starter  

i am trying to set up the weather display. I use this code

HTTPGET=interval:600,source:  http://wttr.in/Vitebsk?u&format=Cond:+%C|Temp:+%t|Wind:+%w,display:%1,Wide:1 

How can i display info in one line and in other uniform dimensions: Km, С,

And if possible to display the weather on the desktop in graphic forl as in the picture in the attachment, at least for 1 day? How?


   
Topic Tags
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1811
 

The problem is you are using the pipe (vertical bar) as part of the http query and the pipe comes back as part of the response. This character is used by Desktop Info to indicate a line feed. You can filter the pipes from the response using regex :

HTTPGET=interval:600,source:   http://wttr.in/Vitebsk?u&format=Cond:+%C|Temp:+%t|Wind:+%w,   display:%1,  Wide:1, regex:[\|], regexr:\,

Or you can use different characters in the request, like html encoded characters

HTTPGET=interval:600,source:   http://wttr.in/Vitebsk?u&format=Cond:+%C%2C%20Temp:+%t%2C%20Wind:+%w,display:%1,Wide:1 

You can also request that a png image file be returned instead of  text:

IMAGE=interval:600, wide:1, height:20, file: http://wttr.in/Vitebsk.png ?u&format=Cond:+%C|Temp:+%t|Wind:+%w

You can also make use of the json format to give you better control of your display:

HTTPGET=interval:600, wide:1, \
 json-keys:current_condition[0].weatherDesc[0].value current_condition[0].temp_F current_condition[0].windspeedMiles, \
 source:   http://wttr.in/Vitebsk?u&format=j1,  \
 display:Cond: %1\, Temp:%2°F\, Wind:%3mph

 

However, you're not going to get that whole ascii display into Desktop Info.

 


   
(@shuttle3000)
New Member Registered
Joined: 9 months ago
Posts: 2
Topic starter  

thanx a lot !


   
Glenn's Page