Skip to content

Commit

Permalink
bump version: Tweak display, add rsync_options correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Glenn McKechnie committed Feb 8, 2018
1 parent b3a05da commit 85c1695
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
18 changes: 10 additions & 8 deletions bin/user/wxobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from weeutil.weeutil import to_bool
from weewx.cheetahgenerator import SearchList

wxobs_version = "0.6.2"
wxobs_version = "0.6.3"

def logmsg(level, msg):
syslog.syslog(level, '%s' % msg)
Expand Down Expand Up @@ -231,7 +231,7 @@ def __init__(self, generator):
send_include = True #This is the default, set to False if you don't want
to send the include file repeatedly to the server. Use with caution
(ie: remember this setting when things stop working, it might be the cure)
rsync_options: Not documented in the skin.confDefault is '-ac'. Use with,
rsync_options: Not documented in the skin.conf Default is '-ac'. Use with,
caution and no spaces allowed.
dest_directory: An option to allow transfer of BOTH include and database
files to the same directory as specified with this. If using multiple
Expand Down Expand Up @@ -459,14 +459,16 @@ def __init__(self, generator):
# database transfer
db_loc_file = "%s" % (self.sqlite_db)
db_ssh_str = "%s@%s:%s/" % (self.rsync_user, self.rsync_server,
rsync_options, self.sq_root)
Rsync(self.rsync_user, self.rsync_server, db_loc_file, db_ssh_str,
self.sq_root, self.wxobs_debug, self.log_success)
self.sq_root)
Rsync(self.rsync_user, self.rsync_server, self.rsync_options,
db_loc_file, db_ssh_str, self.sq_root, self.wxobs_debug,
self.log_success)

if self.send_inc:
# perform include file transfer if wanted
inc_loc_file = "%s" % (self.include_file)
inc_ssh_str = "%s@%s:%s/" % (self.rsync_user, self.rsync_server,
rsync_option, sself.inc_path)
Rsync(self.rsync_user, self.rsync_server, inc_loc_file, inc_ssh_str,
self.inc_path, self.wxobs_debug, self.log_success)
self.inc_path)
Rsync(self.rsync_user, self.rsync_server, self.rsync_option,
inc_loc_file, inc_ssh_str, self.inc_path, self.wxobs_debug,
self.log_success)
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def loader():
class wxobsInstaller(ExtensionInstaller):
def __init__(self):
super(wxobsInstaller, self).__init__(
version="0.6.2",
version="0.6.3",
name='wxobs',
description='Generates weewx report page that uses php to extract'
'archival data (Daily climatological summaries) from the weewx'
Expand Down
17 changes: 11 additions & 6 deletions skins/wxobs/wxobs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
## 04-02-2018 rename include file to reflect database name. (allows parallel setups)
## 06-02-2018 allow both files to be moved as a set, to any writable position, create
## nested directories on first pass. add tooltip
## Version 0.6.2
## 08-02-2018 Tweak display, add rsync_options (undocumented except in wxobs.py)
## Version 0.6.3

<!-- wxobs version $wxobs_version -->
<!-- This weewx extension is available at github: https://github.com/glennmckechnie/weewx-wxobs -->
Expand All @@ -37,7 +38,7 @@
<form name="form" method="POST" action="index.php">
Choose the date:
<input id="start_dt" name="datepicker" class="datepicker">
<input type="submit" name="submitDate" value="Show records">
<input type="submit" name="submitDate" placeholder="25-12-2017" value="Show records" >
</form>
</div>
<?php
Expand Down Expand Up @@ -65,7 +66,7 @@ if ((@include '$include_file') === false) {
echo "There are also <a href=\"https://github.com/glennmckechnie/weewx-wxobs/wiki/Remote-installation\">Wiki notes</a> that may help for this, and setting up remote servers.</p></div>";
}
require '$include_file';
echo "$include_file";
/* echo "$include_file";*/

/*
* ToDo ??
Expand Down Expand Up @@ -915,7 +916,9 @@ if ($debug =='1') {
</p></div></div></body></html>";
return;
}
$this_day = date('d-M-Y', $pick_start);
/* Return day-month-year only */
/* $this_day = date('d-M-Y', $pick_start); */
$minmax_day = date('d-m-Y');

if ($debug == '1') {
echo "Min Max:<br> latest date = ", hDate($latest_date), " : day_start = ",
Expand All @@ -930,7 +933,7 @@ if ($debug =='1') {
// Create Min Max table headers - ugly layout but ok in html source
echo "<!-- start snapshot summary observations -->
<h2>Historical Observations for $this_day</h2>
<h3><a title=\"Lowest and Highest observations for the nominated day.\">Min (Max) Stats</a></h3>
<h3><a title=\"Lowest and Highest observations for the nominated day.\">Stats for the day : Min (Max) or Averages</a></h3>
<table class=\"wxdata\">
<thead>
<tr>
Expand All @@ -955,7 +958,9 @@ if ($debug =='1') {
}


echo "<tr><td> $dbase_date<!-- $st_day : $en_day --></td>";
/* Return day-month-year only
echo "<tr><td> $dbase_date<!-- $st_day : $en_day --></td>"; */
echo "<tr><td> $minmax_day &nbsp;&nbsp;- -:- - <!-- $st_day : $en_day --></td>";
$x = $tempConvert ($stats_row[1]);
$minTemp = round($x, 1);
$x = $tempConvert ($stats_row[2]);
Expand Down

0 comments on commit 85c1695

Please sign in to comment.