diff --git a/README.md b/README.md index dda6923..6f916db 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,12 @@ +**Update: Sept 2020** --- A minor change to note that weewx.conf takes priority over any skin.conf entries. See [How options work](http://weewx.com/docs/customizing.htm#How_options_work) in the Customizing Guide for the full details. This change is required for the label logic when manually changing units to something other than what is in the weewx database. If you have an installation that is already displaying the labels as you want them, then this update is not required. -**Update: Jun 2020** --- Available as [release 0.7.2](https://github.com/glennmckechnie/weewx-wxobs/releases) - -Add weewx4 style logging - -**Update: Jan 2020** +Available as [release 0.7.3](https://github.com/glennmckechnie/weewx-wxobs/releases) -Runs with python2.7 or python3 ie:- runs under weewx4. - -Add logic to detect and create /usr/share/php directory which seems to be missing from some installations, even though phpinfo.php shows it as being available, or required. ---- -The remote installation centers around rsyncing an sqlite database to the remote server. If you run an MySQL database then the required configuration for that is built in to mysql and should just require the correct variable names entering. This will vary with each setup so a single configuration example is not in my scope. If you have working notes and wish to share them, then raise them as an issue and we'll start from there. +The remote installation centers around rsyncing an sqlite database to the remote server. If you run an MySQL database then the required configuration for that is built in to mysql and should just require the correct variable names entering. This will vary with each setup so a single configuration example is not in my scope. If you have working notes and wish to share them, then raise them as an issue and we'll start from there. The weewx-user group is also a starting point for queries. @@ -161,7 +155,18 @@ Nothing seems to have broken (for me). It fixed the problem but I'm not knowledg p.s. datepicker's origins are unknown but a search of github will turn up many versions. I'll find one that matches this one and give a link - [This one](https://github.com/chrishulbert/datepicker) is very close to it. -# Changes +# Previous Changes + +**Update: Jun 2020** --- Available as [release 0.7.2](https://github.com/glennmckechnie/weewx-wxobs/releases) + +Add weewx4 style logging + +**Update: Jan 2020** + +Runs with python2.7 or python3 ie:- runs under weewx4. + +Add logic to detect and create /usr/share/php directory which seems to be missing from some installations, even though phpinfo.php shows it as being available, or required. + **Update: July 2018** --- Available as [release 0.7.0](https://github.com/glennmckechnie/weewx-wxobs/releases) Simplify single/average output diff --git a/bin/user/wxobs.py b/bin/user/wxobs.py index dafd7d8..e19caf0 100644 --- a/bin/user/wxobs.py +++ b/bin/user/wxobs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 -2020 Glenn McKechnie +# Copyright (c) 2017-2020 Glenn McKechnie # Credit to Tom Keffer , Matthew Wall and the core # weewx team, all from whom I've borrowed heavily. # Mistakes are mine, corrections and or improvements welcomed @@ -22,7 +22,7 @@ from weeutil.weeutil import to_bool from weewx.cheetahgenerator import SearchList -wxobs_version = "0.7.2" +wxobs_version = "0.7.3" try: # weewx4 logging diff --git a/install.py b/install.py index e9cad4d..2b79651 100644 --- a/install.py +++ b/install.py @@ -11,17 +11,24 @@ def loader(): class wxobsInstaller(ExtensionInstaller): def __init__(self): super(wxobsInstaller, self).__init__( - version="0.7.2", + version="0.7.3", name='wxobs', description='Generates a php report to show daily summaries', author="Glenn McKechnie", author_email="glenn.mckechnie@gmail.com", config={ 'StdReport': { - 'wxobs': { - 'skin': 'wxobs', - 'HTML_ROOT': 'wxobs' - }}}, + 'wxobs': { + 'skin': 'wxobs', + 'HTML_ROOT': 'wxobs', + 'Units': { + 'Groups': { + 'group_percent': 'percent', + }, + }, + }, + }, + }, files=[('bin/user', ['bin/user/wxobs.py']), ('skins/wxobs', diff --git a/skins/wxobs/skin.conf b/skins/wxobs/skin.conf index b449fe2..7eaabc5 100644 --- a/skins/wxobs/skin.conf +++ b/skins/wxobs/skin.conf @@ -252,14 +252,32 @@ # Once you have decided on the units you are using, either those # provided by the database or ones that you have chosen by configuring # the [[PHPUnits]] section above, then you need to make a selection - # below for the label units; just as you would for any other weewx skin. + # below for the label units; just as you would for any other weewx + # skin. # # The exception is these are purely for use as labels - they have NO - # affect on the values displayed. (unlike if this was a pure python skin) + # affect on the values displayed. (unlike if this was a pure python + # skin) # # Weewx will default to Imperial units if there is no adjustment made # below. Uncomment these and select a suitable option from the # Option # examples listed at the end of each relevant line. + # + # N.B. For these to take affect they should then be copied to the + # configuration section in weewx.conf, under [StdReport][[wxobs]] + # weewx.conf file. Within that you will find a section that appears + # as follows... + # + # [[wxobs]] + # ... + # [[[Units]]] + # [[[[Groups]]]] + # group_percent = percent + # + # add your entries to the Groups section as per the percentage example. + # + # The why is explained here... + # http://weewx.com/docs/customizing.htm#How_options_work # group_direction = degree_compass # group_percent = percent diff --git a/skins/wxobs/wxobs.inc b/skins/wxobs/wxobs.inc index d50dcc0..cd2b651 100644 --- a/skins/wxobs/wxobs.inc +++ b/skins/wxobs/wxobs.inc @@ -5,6 +5,7 @@ ## in Latin-1, then you should replace the string "UTF-8" with "latin-1". If ## you do this, you should also change the charset in 'Content-Type' as well. #encoding UTF-8 +## Copyright 2017-2020 Glenn McKechnie ## php inclusion to create wxobs.php.tmpl by glenn.mckechnie@gmail.com ## available at https://github.com/glennmckechnie/weewx-wxobs ## 06-09-2017 initial releas @0.01 @@ -34,9 +35,13 @@ ## index.php. Use dest_dir as switch. ## 14-01-2020 Python3 tweaks. Work around missing /usr/share/php directory. Fix mode ## on os.mkdir +## 00-01-2020 Runs with python2.7 or python3 ie:- runs under weewx4 +## 00-06-2020 Available as release 0.7.2 Add weewx4 style logging +## 07-08-2020 Minor change to remedy missing labels when units other than defaults are used. +## Available as release 0.7.3 ## ## -## Version 0.7.1 +## Version 0.7.3