pyiem.nws.products.cli module
Parser and object storage of information within NWS CLI Product.
-
pyiem.nws.products.cli.update_iemaccess(txn, entry)[source]
Update the IEM Access Database.
-
pyiem.nws.products.cli.trace_r(val)[source]
Convert our value back into meaningful string
-
pyiem.nws.products.cli.get_number_year(text)[source]
Ensure we get a year that makes sense.
-
pyiem.nws.products.cli.get_number(text)[source]
Convert a string into a number, preferable a float!
-
pyiem.nws.products.cli.convert_key(text)[source]
Convert a key value to something we store
-
pyiem.nws.products.cli.make_tokens(regime, line)[source]
Turn a line into tokens based on a regime
-
pyiem.nws.products.cli.parse_snowfall(regime, lines, data)[source]
Parse the snowfall data
-
pyiem.nws.products.cli.parse_precipitation(regime, lines, data)[source]
Parse the precipitation data
-
pyiem.nws.products.cli.parse_temperature(prod, regime, lines, data)[source]
Here we parse a temperature section
-
pyiem.nws.products.cli.parse_sky_coverage(lines, data)[source]
Turn section into data.
-
pyiem.nws.products.cli.parse_headline(section)[source]
Figure out when this product is valid for
-
pyiem.nws.products.cli.parse_wind(lines, data)[source]
Parse any wind information.
-
pyiem.nws.products.cli.sql_data(prod, cursor, data)[source]
Do an individual data entry.
-
class pyiem.nws.products.cli.CLIProduct(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]
Bases: TextProduct
Represents a CLI Daily Climate Report Product
-
find_sections()[source]
Some trickery to figure out if we have multiple reports
- Returns:
list of text sections
-
compute_diction(text)[source]
Try to determine what we have for a format
-
get_jabbers(uri, _=None)[source]
Override the jabber message formatter
-
parse_data(section)[source]
Actually do the parsing of this silly format
-
sql(cursor)[source]
Do the database update!
-
pyiem.nws.products.cli.parser(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]
Parse CLI Text Products.
- Parameters:
nwsli_provider (dict) – This dictionary provider in the form of the
pyiem.network.Table object should contain additional attributes of
access_station and access_network to map back to IEMAccess.