Weather API In Desk...
 
Notifications
Clear all

We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.

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.

Weather API In Desktop Info

10 Posts
2 Users
2 Reactions
525 Views
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

how can we add desktop info to have weather?  Alternatively we can use this:

curl "http://wttr.in/Cave_Creek?1AFnq"

 

 


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

I use this one:

HTTPGET=interval:600, source: https://api.openweathermap.org/data/2.5/weather?q=Melbourne\,au&units=metric&APPID=4b2466af349e8ee536e44a976ba9c46c,  timeout:6000, set:weather2=%2 weather3=%3 weather4=%4 wicon=%1@2x.png,\
  json-keys:weather[0].icon weather[0].description clouds.all main.temp,\
  text:Weather, display:%2 Cloud:%3% Temp:%4[2.1f]°C

   
ReplyQuote
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

where would we add this?  just text=?  I'm also having trouble with the shift key moving the location of the app on screen.  Do we use this

MONITOR=set:sx=%4 sy=%5


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

Posted by: @maricopajoe

where would we add this?

just copy and paste that anywhere in your [items] section

Posted by: @maricopajoe

I'm also having trouble with the shift key moving the location of the app on screen

You can add allowdrag=0 to the [options] section to prevent shift dragging. page 19.
Posted by: @maricopajoe

MONITOR=set:sx=%4 sy=%5

what are you trying to do?


   
ReplyQuote
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

@glenn Thank you Glenn.  I had an RTFM moment and it was found on page 19.

Excuse the oversight...

With DTI set to monitor-mode=1

top=0 right=0, it positions itself at the top right of the laptop display when it is out of the dock and the top

right of the secondary monitor when it is in the dock.


   
Glenn reacted
ReplyQuote
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

Glen:  I see the same question all over the forum.  I DID check the manual on filtering output with REGEX but no joy.

Sadly, I found the json info AFTER getting the code correctly.  You indicate to filter the output for ascii chars in this post ( https://www.glenn.delahoy.com/community/desktop-info/retrieving-weather-info-with-httpget-and-wttr-in/).

How would I apply the regex filtering regex:[^\x00-\x7F]+ to this:  HTTPGET=font-size:8,interval:600,source: https://wttr.in/Cave_Creek?Q&format=%25C+/+%25t+/+%25w+/+%25p

Thanks.


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

@maricopajoe same way i presume, add the regex option to the HTTPGET item. according to that post it filters out non-ascii characters. i don't recall why that was necessary, perhaps the result set includes line feeds or something.


   
ReplyQuote
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

@glenn

regex:[^\x00-\x7F]HTTPGET=font-size:8,interval:600,source:  https://wttr.in/Cave_Creek?Q&format=%25C+/+%25t+/+%25w+/+%25p

causes the tool not to launch at all

 


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

@maricopajoe

Here's what I got:

HTTPGET=font-size:8,interval:600, regex:[^\x00-\x7F]+, source: https://wttr.in/Cave_Creek?u&format=%C+/+%t+/+%w+/+%p 

   
ReplyQuote
maricopajoe
(@maricopajoe)
Eminent Member Registered
Joined: 5 years ago
Posts: 18
Topic starter  

@glenn OUTSTANDING.  Thanks!  Here is the end result for others:

HTTPGET=hide-no-result:1,font-size:8,text:,interval:600,regex:[^\x00-\x7F]+,source: https://wttr.in/Cave_Creek?u&format=Cond:+%C|Temp:+%t|Wind:+%w|Prsr:+%p,display:%1,Wide:%1


   
Glenn reacted
ReplyQuote
Glenn's Page