From b3c67be6c31845510e4e70bf2ec00f039335f77a Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Wed, 31 Oct 2012 03:56:28 +0000 Subject: [PATCH] V2.0.0b14 --- TODO.txt | 2 +- bin/weeutil/weeutil.py | 18 +++++++++++++++++- bin/weewx/__init__.py | 2 +- docs/CHANGES.txt | 2 ++ docs/customizing.htm | 8 ++------ docs/usersguide.htm | 2 +- docs/weewx_docs.css | 6 +++--- weewx.conf | 2 +- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/TODO.txt b/TODO.txt index 70f76008..f31cc987 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,6 @@ TODO before the next release: -Improve the documentation on writing a custom search list. +Offer a way to change the horizon for the almanac. Calculate altimeter pressure to send off to CWOP. See http://davisnet.com/product_documents/weather/app_notes/AN_28-derived-weather-variables.pdf diff --git a/bin/weeutil/weeutil.py b/bin/weeutil/weeutil.py index 73a57f9e..f654fd0e 100644 --- a/bin/weeutil/weeutil.py +++ b/bin/weeutil/weeutil.py @@ -578,12 +578,28 @@ def timestamp_to_string(ts): >>> print timestamp_to_string(1196705700) 2007-12-03 10:15:00 PST (1196705700) + >>> print timestamp_to_string(None) + ******* N/A ******* ( N/A ) """ if ts: return "%s (%d)" % (time.strftime("%Y-%m-%d %H:%M:%S %Z", time.localtime(ts)), ts) else: - return "****** N/A ******** ( N/A )" + return "******* N/A ******* ( N/A )" +def timestamp_to_gmtime(ts): + """Return a string formatted for GMT + + >>> print timestamp_to_gmtime(1196705700) + 2007-12-03 18:15:00 UTC (1196705700) + >>> print timestamp_to_gmtime(None) + ******* N/A ******* ( N/A ) + """ + if ts: + return "%s (%d)" % (time.strftime("%Y-%m-%d %H:%M:%S UTC", time.gmtime(ts)), ts) + else: + return "******* N/A ******* ( N/A )" + + def utcdatetime_to_timestamp(dt): """Convert from a datetime object holding a UTC time, to a unix timestamp. diff --git a/bin/weewx/__init__.py b/bin/weewx/__init__.py index 9c68914a..12577b8e 100644 --- a/bin/weewx/__init__.py +++ b/bin/weewx/__init__.py @@ -12,7 +12,7 @@ """ import time -__version__="2.0.0b13" +__version__="2.0.0b14" # Holds the program launch time in unix epoch seconds: # Useful for calculating 'uptime.' diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index e2dbdd0d..35cc8220 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -37,6 +37,8 @@ along the way. See the Customizing Guide. You can now use "mmHg" as a unit of pressure. +Added new almanac information such as first and last quarter moons. + Changed the engine architecture so it is more event driven. It now uses callbacks, making it easier to add new event types. diff --git a/docs/customizing.htm b/docs/customizing.htm index 273d38ac..48e2c333 100644 --- a/docs/customizing.htm +++ b/docs/customizing.htm @@ -16,10 +16,6 @@ @@ -856,7 +852,7 @@ Next summer, winter solstice: 21-Jun-2011 10:16 21-Dec-2011 21:29 Sunrise, sunset: 06:51 19:30

Here's a table of available extended almanac information:

- +
@@ -1931,7 +1927,7 @@ class MyAlarm(StdService): ... ('electricity', 'REAL'), ('inTempBatteryStatus', 'REAL')] -

The new line has been highlighted in yellow.

+

The new line has been highlighted.

2. Check permissions. The reconfiguration utility will create a new database with the same name as the old, except with the suffix '_new' attached to the end. Make sure you have the necessary permissions to do this. diff --git a/docs/usersguide.htm b/docs/usersguide.htm index ea239bc6..e6797d1a 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -631,7 +631,7 @@ Mutating actions will request confirmation before proceeding. Gain: -1.000 Offset: -1.000

- Values in yellow can be + Highlighted values can be changed.

For example, to change the archive interval to 10 minutes (600 diff --git a/docs/weewx_docs.css b/docs/weewx_docs.css index 1ea60bb8..2cb8a562 100644 --- a/docs/weewx_docs.css +++ b/docs/weewx_docs.css @@ -120,9 +120,9 @@ td { .xxsmall { font-size: xx-small; } -.highlight { - background-color: #FFFF66; -} +.highlight { + background-color: #FFCC99; +} .center { text-align: center; } diff --git a/weewx.conf b/weewx.conf index d5876b88..6a6121be 100644 --- a/weewx.conf +++ b/weewx.conf @@ -32,7 +32,7 @@ WEEWX_ROOT = /home/weewx socket_timeout = 20 # Current version -version = 2.0.0b13 +version = 2.0.0b14 ############################################################################################

previous_equinox next_equinox