Lynx Accessible Weather

Linux for blind general discussion blinux-list at redhat.com
Tue Oct 31 19:51:30 UTC 2017


Tim here.  I have no idea my latitude/longitude, but I did a search
on Wikipedia and part of the page includes the latitude/longitude in
degrees/minutes/seconds. But it was a link to the Open StreetMap page
which includes them in decimal form (I could also have done the math,
but was feeling a little lazy).  The NWS page outputs concise data,
but the granularity is low.  Thus it finds that DFW airport is the
closest station to me, but the weather here and in DFW can be
radically different, despite a mere 30 miles or so between us.

If you just want a subset of the output from that page, you can pipe
it with "lynx -dump" through the utility of your choice, such as

alias weather='lynx -dump "https://forecast-v3.weather.gov/point/32.7758,-96.7967?view=plain&mode=min" | sed "1,/Weekly [fF]orecast/d;/Point Forecast/,\$d"'

which uses sed to chop off extra stuff at the top/bottom.

-tim


On October 31, 2017, Linux for blind general discussion wrote:
> I'll have to also try that as I do know our air port code and our
> latitude and longitude at least the degrees part, not the minutes
> but that would probably get one quite close enough.
> 
> 	Maybe a little tinkering with perl could make it just
> right.
> 
> 	Before I retired, I worked in Network Operations at
> Oklahoma State University for 25 years and dabbled in C as in gcc
> before a coworker got me to learning perl.  I now wish I had
> spent more time developing in perl since what one comes up with
> is faster to produce and tends to have less hidden bugs in it.
> 
> 	The truth be known, A better C programmer also comes up
> with programs that have fewer hidden bugs so I am not blaming
> anybody but myself.  Figuring out how to make the machines do
> what we want them to do is fun and sometimes, a little
> frustrating.
> 
> Many thanks.
> 
> 	Martin
> Linux for blind general discussion <blinux-list at redhat.com> writes:
> > Tim here. While not lynx accessible per se, you can use
> > 
> >   $ curl http://wttr.in/dallas,tx
> > 
> > to get a weather report in the terminal.  I have a few small
> > issues with it, though the biggest is that it tries to be pretty
> > and ends up going beyond 80 columns of text.  But you can change
> > the location to any number of things, whether zip-code, city
> > name, or airport code.
> > 
> > There's more documentation and source at
> > 
> > https://github.com/chubin/wttr.in
> > 
> > I'm not sure of its weather source (if it ties to Weather
> > Underground or not)
> > 
> > Alternatively, if you know your latitude and longitude, you can
> > plug them in this URL
> > 
> > https://forecast-v3.weather.gov/point/32.7758,-96.7967?view=plain&mode=min
> > 
> > (that happens to be Dallas, TX near here) which uses the NWS data.
> > You can either bookmark it in lynx or make a function/alias in
> > bash to pull up that URL for you quickly.
> > 
> > Hope those suggestions help,
> > 
> > -tim  
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list




More information about the Blinux-list mailing list