How stable is the output here? I noticed sections are delimited by '&&', and start with '.<SECTION TITLE>...'.
If it's stable, then it might be fun to write a cli client to query/display this..
Five minutes in python3 + requests:
#!/usr/bin/python
import requests
import re
SHOW_GROUPS = ['SYNOPSIS', 'DISCUSSION', 'MTR WATCHES/WARNINGS/ADVISORIES']
CITY = 'MTR'
txt = requests.get('https://forecast.weather.gov/product.php?site=NWS&issuedby='+CITY+'&product=AFD&format=txt&version=1&glossary=0', timeout=30).text
m = re.search(r'(?mis)<pre class="glossaryProduct">(.*)</pre>', txt)
groups = m.group(1).split('&&\n')
for g in groups:
m = re.search(r'\.(.*?)\.\.\.', g)
if m and m.group(1) in SHOW_GROUPS:
print(g.strip()+'\n')Yep, not hard if the input is somewhat stable...
Probably quite stable; this stuff dates back to the telegraph...
source?
If you read it long enough, you'll start to pick up some of the 'why' in the weather.
Here's an example:
https://forecast.weather.gov/product.php?site=NWS&issuedby=M...
I suppose you could curl it...