Getting tomorrow's high temperature

Thomas Arman tarman at me.com
Sat Aug 1 16:51:26 EDT 2015


Here is command that just provides the digits of the temp:

curl http://api.wunderground.com/api/0516fe43ba763806/forecast/q/NC/Raleigh.json 2>/dev/null | grep \"fahrenheit\": | sed  -n 3p | sed s/.\*\"fahrenheit\":\"// | sed s/\",// 

94

The “3p” selects the third temperature from the response where 1st and 2nd are “DAY 1 high and low” and 3rd and 4th are “DAY 2 high and low”.

Tom

> On Aug 1, 2015, at 4:39 PM, Thomas Arman <tarman at me.com> wrote:
> 
> Chuck
> 
> Not sure if “tomorrow” is always the second day… may have to adjust the command for that.  
> 
> This terminal command gives the projected High for the “second day”.
> 
> curl http://api.wunderground.com/api/..KEY../forecast/q/NC/Raleigh.json <http://api.wunderground.com/api/..KEY../forecast/q/NC/Raleigh.json> 2>/dev/null | grep \"fahrenheit\”: | sed -n 3p
> 
> I get:
> 		"fahrenheit":"93”,
> 
> Which you can cleanup with “sed”.
> 
> Tom
> 
>> On Aug 1, 2015, at 3:58 PM, Chuck <xtension4osx at mac.com <mailto:xtension4osx at mac.com>> wrote:
>> 
>> Thomas,
>> 
>> I have tried parsing web links and the position of the data keeps moving. I had it working for a short time and then something changed and I was getting bad information.
>> 
>> Chuck
>> 
>>> On Aug 1, 2015, at 12:35 PM, Thomas Arman <tarman at me.com <mailto:tarman at me.com>> wrote:
>>> 
>>> Chuck,
>>> 
>>> I would take a bit of parsing, but Weather Underground has a FREE API for that.
>>> 
>>> http://www.wunderground.com/weather/api/d/docs <http://www.wunderground.com/weather/api/d/docs>
>>> 
>>> Tom
>>>> On Aug 1, 2015, at 3:00 PM, Chuck <xtension4osx at mac.com <mailto:xtension4osx at mac.com>> wrote:
>>>> 
>>>> Is anyone able to extract the high temperature forecast for the next day out of any weather app? I need to get that information to help with my environmental controls in the house.
>>>> 
>>>> I have WeatherMan and can’t consistently get that information. I don’t have any other apps to try out and figured that I would ask the list to see if anyone already has a solution.
>>>> 
>>>> My goal is to adjust my exhaust fans according to tomorrow’s high temperature forecast. I don’t want to get the house down to 50º if the high tomorrow is only going to be 60º.
>>>> 
>>>> Currently I have to look at the forecast every day and adjust the system accordingly.
>>>> 
>>>> Chuck
>>>> _______________________________________________
>>>> XTensionList mailing list
>>>> XTensionList at shed.com <mailto:XTensionList at shed.com>
>>>> http://shed.com/mailman/listinfo/xtensionlist <http://shed.com/mailman/listinfo/xtensionlist>
>>> 
>>> _______________________________________________
>>> XTensionList mailing list
>>> XTensionList at shed.com <mailto:XTensionList at shed.com>
>>> http://shed.com/mailman/listinfo/xtensionlist <http://shed.com/mailman/listinfo/xtensionlist>
>> 
>> _______________________________________________
>> XTensionList mailing list
>> XTensionList at shed.com <mailto:XTensionList at shed.com>
>> http://shed.com/mailman/listinfo/xtensionlist
> 
> _______________________________________________
> XTensionList mailing list
> XTensionList at shed.com
> http://shed.com/mailman/listinfo/xtensionlist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shed.com/pipermail/xtensionlist/attachments/20150801/3b4b01e5/attachment.html>


More information about the XTensionList mailing list