Commit Graph

18 Commits

Author SHA1 Message Date
Jeremy Stanley
a33dd24ec1 Update correlation logic for 2015 Gazetteer
Simple update to handle new filenames for the 2015 US Census Bureau
Gazetteer. Also update a comment which still had the old NWS station
list URL.
2016-10-05 00:49:32 +00:00
Jeremy Stanley
44546ef04d Correct setpath search order
Short-circuit the outer loop in setpath testing so that we stop
iterating through supplied path elements once a match is found.
2016-09-19 15:25:18 +00:00
Jeremy Stanley
c2edb3e07f Update release notes and docs for 2.1 release 2016-09-13 17:41:25 +00:00
Jeremy Stanley
e35fbc4d60 Update NOAA WX weather products URLs
Per http://www.wxforum.net/index.php?topic=29502.0 the old
http://weather.noaa.gov/pub site was deprecated and as of August 23
is no longer in service. Update the software and current dataset to
use working http://tgftp.nws.noaa.gov URLs instead.
2016-08-24 22:56:37 +00:00
Jeremy Stanley
562fc1c1df Support more recent data sources
Add support for 2014 Census Bureau data and the newer version of the
NWS COOP stations file.
2014-10-30 00:26:01 +00:00
Jeremy Stanley
ddf8f22fe8 Correlation building fixes
* weather.py(correlate): Note the updated URL to Census Bureau data
in file comments, and make the County-Public Forecast Zones
Correlation File parsing more robust against errors in the file
formatting.
2014-02-13 01:10:01 +00:00
Jeremy Stanley
1c5bbfd74c Truncate radian floats in data files.
* weather.py(correlate): The radian values in data files have a tendency
to vary by the tiniest rounding errors from one Python release to
another. By truncating them to the 7th decimal place, which is still
sub-meter resolution, this problem is minimized and the resulting data
diffs become far less noisy.
2012-09-19 00:58:31 +00:00
Jeremy Stanley
f7fc45b44d Make sure data files have final newlines.
* weather.py(correlate): Previously the airports, places, stations,
zctas and zones files lacked trailing newlines, so this trivial patch
adds them before each is closed for writing.
2012-09-11 00:16:18 +00:00
Jeremy Stanley
e7256def4f 2010 Census U.S. Gazetteer file layout changed.
* weather.py(correlate): The United States Census Bureau altered the
format of their 2010 Gazetteer on August 22, 2012, adding and reordering
a few fields. The previous version of the parser assumed a fixed field
order and ceased to work with the updated data files, so now the order
is inferred from the column headings in the first line of each file
instead.
2012-09-10 03:28:49 +00:00
Jeremy Stanley
13eb635aca Add /etc/weather/weatherrc to config search.
* weather.1(INPUT FILES): Updated the list of potential weatherrc
locations to reflect those mentioned in the INSTALL file, particularly
the addition of /etc/weather/weatherrc in the 2.0 release.

* weather.py(get_config): Adjusted the configuration search locations to
include /etc/weather/weatherrc, since the INSTALL file started
mentioning it in the 2.0 release even though it wasn't actually
implemented as pointed out by Ben Kohler.
2012-08-30 11:13:57 +00:00
Jeremy Stanley
88d6a8444c Make --quiet quieter again.
* weather.py(Selections, guess): The the search cache notification
doesn't belong in terse output, as pointed out by Eric Cooper.
2012-07-12 21:32:13 +00:00
Jeremy Stanley
93f58b4538 Imported from archive.
* Release 2.0: Heavy rewrite with too many new features to enumerate
here in the ChangeLog file.

* NEWS: List of important changes since 1.x releases.

* weather, weather.py: Implemented support for Python 3000 as
requested by ptchinster on behalf of Arch Linux, conditions/forecast
searches by latitude/longitude requested by Brandt Daniels, support
for newer NOAA forecasts pointed out by Darryl Mouck and Richard
Dooling, custom URIs requested by Michel Pelzer, international
weather stations requested by Milton Hubsher, and fixed a metric
conversion issue with negative values reported by Jochen Keil,
Michiel Appelman and Stefan Metzlaff. Thanks to everyone for your
input and assistance!
2012-06-26 00:48:37 +00:00
Jeremy Stanley
4d25a49d5a Imported from archive.
* Release 1.5.

* (all): Updated copyright notices for 2010.

* FAQ, INSTALL, LICENSE, README: Reformatted as ReStructuredText.

* FAQ: Updated to mention alternative sources for NOAA's stations
list, in case the recommended one is unavailable (thanks Celejar!).

* NEWS: Renamed to ChangeLog and refactored into GNU format.

* weather: Added some comment padding between the shebang line and
the copyright, so that distributions wishing to carry patches which
modify the interpreter path don't have to refresh them every year
when the copyright line changes in their context.

* weather, weather.1, weatherrc.5, weather.py: Added experimental
alert, atypes, aurl and zones options to support retrieval,
filtering and formatting of unexpired NWS severe weather advisories.

* weather.1, weatherrc.5: Minor cosmetic fixes to option
descriptions.

* weather.1, weatherrc.5, weather.py: Added imperial and metric
options to filter/convert display units (thanks to Andrew Carter for
this suggestion!).

* weather.py: Fixed a METAR parsing error which would trigger an
IndexError exception if the NWS didn't have a station description on
file (thanks to Celejar for reporting the bug!). Fixed METAR title
line parsing to look for human-readable city and state in the first
line--previous code stopped showing the city name after NWS made
slight format mods. Upped the version to 1.5.

* weatherrc: Additional PIE (Saint Petersburg, FL), PNC (Ponca City,
OK), and PNS (Pensacola, FL) aliases.
2010-03-19 13:30:22 +00:00
Jeremy Stanley
8349654b7c Imported from archive.
* Release 1.4.

* (all): Updated the copyright years for 2008 on some of the files
in the current release and added a copyright statement to any files
previously lacking one.

* LICENSE: Replaced the previous BSD-like license with the one used
by the OpenBSD project (modeled after the Internet Software
Consortium's, a two-clause BSD license removing language made
unnecessary by the Berne convention); this new license is
functionally identical to the old one, just more terse and openly
recognized.

* weather: Clarified function parameters in calls from the wrapper
script to ease future ABI changes in the underlying module.

* weather, weather.py: Some extra comments were added to the source,
indentation style was updated from tab characters to three-space,
and lines longer than 79 columns were refactored or otherwise split.

* weather.1, weather.5, weather.py: Added an flines option to allow
the maximum number of forecast output lines to be shortened. Added
furl and murl options to allow overriding of the default current
conditions and forecast data retrieval URLs. Added a headers option
to allow overriding the default list of header names for current
conditions data filtering. Added a quiet option to suppress the
preamble lines and indentation for both current conditions and
forecast output.

* weather.py: Replaced the hardcoded fallback default METAR station
ID and forecast city/state abbreviation with error messages to
minimize confusion when necessary values are omitted. Adjusted a
couple of hard-coded error message strings to be consistent with the
output format of the option_parser module. Switched from urllib to
urllib2 for retrieving data, providing a simpler means to detect and
report retrieval errors. Upped the version to 1.4.
2008-07-13 07:49:02 +00:00
Jeremy Stanley
eb249a0ae2 Imported from archive.
* Release 1.3.

* FAQ: Update to clarify that specifying an id won't automatically
provide a city and st to get the accompanying forecast.

* weather: Provided a consistent means for relocating weather.py to
a private location; thanks to Mark Tran for pointing out a conflict
with pyweather in ArchLinux (and presumably other distros as well).

* weather.py: Upped the version to 1.3.
2006-07-25 23:00:47 +00:00
Jeremy Stanley
a4375bf577 Imported from archive.
* Release 1.2.

* FAQ, README: Updated for inclsuion of weather-util in Debian.

* weather.py: Upped the version to 1.2.

* weatherrc: Added more default aliases PAO and SJC (requested by
Russ Allbery).
2006-06-30 17:42:14 +00:00
Jeremy Stanley
b755668b64 Imported from archive.
* Release 1.1.

* weather: Switched to "#!/usr/bin/env python" instead for
portability.

* weather.1, weather.5, weather.py: Implemented the --omit-forecast
option to cancel --forecast.

* weather.py: Calling with undefined aliases now throws an error and
exits. Aliases, options and default overrides operate more
logically. Upped the version to 1.1.

* weatherrc: Added 214 standard aliases.
2006-04-18 04:33:21 +00:00
Jeremy Stanley
155d8574df Imported from archive.
* Initial release 1.0.
2006-03-26 17:08:52 +00:00