Skip to content

Commit

Permalink
WeeWX 4/Py3 udpate.
Browse files Browse the repository at this point in the history
  • Loading branch information
chaunceygardiner committed Jul 19, 2020
1 parent 9f77f4d commit 19ec9af
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def loader():
class ExfoliationInstaller(ExtensionInstaller):
def __init__(self):
super(ExfoliationInstaller, self).__init__(
version="0.45",
version="0.46",
name='exfoliation',
description='A minimalist layout with lots of data.',
author="Matthew Wall",
Expand Down
26 changes: 13 additions & 13 deletions skins/exfoliation/forecast_table.inc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function toggle_hours(control, id) {
#end if


#if $show_legend and len($periods) > 0
#if $show_legend and $periods is not None and len($periods) > 0
<div class='legend'>
<table>
<tr>
Expand All @@ -158,7 +158,7 @@ function toggle_hours(control, id) {
#if $show_wind
<td class='col-wind' style='text-align:center'><img src='icons/flag.png' class='legend-img' alt='W' title='wind' /><br/><span class='units'>$unit.label.wind</span></td>
#end if
#if $show_tides and len($tides) > 0
#if $show_tides and $tides is not None and len($tides) > 0
<td class='col-tides'><img src='icons/water.png' class='legend-img' alt='tide' title='tides' /><br/><span class='units'>$unit.label.altitude</span></td>
#end if
#if $show_sun
Expand All @@ -184,7 +184,7 @@ function toggle_hours(control, id) {
</div>
#end if ## show_legend

#if len($periods) == 0
#if $periods is not None and len($periods) == 0
<p>No data for forecast $forecast_source</p>
#end if

Expand Down Expand Up @@ -271,7 +271,7 @@ function toggle_hours(control, id) {
<span class='windgust'>$summary.windGust.nolabel('%.0f',' ')</span>$summary.windChar
</td>
#end if
#if $show_tides and len($tides) > 0
#if $show_tides and $tides is not None and len($tides) > 0
<td class='col-tides'>
<table cellspacing='0' cellpadding='0' width='100%'>
#for $tide in $tides
Expand Down Expand Up @@ -308,15 +308,15 @@ function toggle_hours(control, id) {
#end if
#if $show_pop
<td class='col-pop'>
#if $summary.pop.raw > 0
#if $summary.pop.raw is not None and $summary.pop.raw > 0
$summary.pop.format('%.0f','')
#end if
<br/>
#if $summary.qpf.raw > 0
#if $summary.qpf.raw is not None and $summary.qpf.raw > 0
$summary.qpf.nolabel('%.2f','') <img class='pop-img' src='icons/raindrop.png' />
#end if
<br/>
#if $summary.qsf.raw > 0
#if $summary.qsf.raw is not None and $summary.qsf.raw > 0
$summary.qsf.nolabel('%.2f','') <img class='pop-img' src='icons/snowflake.png' />
#end if
</td>
Expand Down Expand Up @@ -386,7 +386,7 @@ function toggle_hours(control, id) {
$period.windSpeed.nolabel('%.0f',' ') <span class='windgust'>$period.windGust.nolabel('%.0f',' ')</span>$period.windChar<br/>
</td>
#end if
#if $show_tides and len($tides) > 0
#if $show_tides and $tides is not None and len($tides) > 0
<td class='col-tides'>
#for $tide in $tides
#if $period.event_ts.raw <= $tide.event_ts.raw < $period.event_ts.raw + $period.duration and $tide.event_ts.raw < $nextday_ts
Expand Down Expand Up @@ -420,15 +420,15 @@ function toggle_hours(control, id) {
#end if
#if $show_pop
<td class='col-pop'>
#if $period.pop.raw > 0
#if $period.pop.raw is not None and $period.pop.raw > 0
$period.pop.format('%.0f',' ')
#end if
<br/>
#if $period.qpf.raw > 0
#if $period.qpf.raw is not None and $period.qpf.raw > 0
$period.qpf.nolabel('%.2f',' ') <img class='pop-img' src='icons/raindrop.png' />
#end if
<br/>
#if $period.qsf.raw > 0
#if $period.qsf.raw is not None and $period.qsf.raw > 0
$period.qsf.nolabel('%.2f',' ') <img class='pop-img' src='icons/snowflake.png' />
#end if
</td>
Expand Down Expand Up @@ -463,7 +463,7 @@ function toggle_hours(control, id) {
#end if ## show_hourly
#end for ## period in periods

#if $show_hourly and len($periods) > 0
#if $show_hourly and $periods is not None and len($periods) > 0
</table>
</div>
#end if
Expand All @@ -477,7 +477,7 @@ function toggle_hours(control, id) {
#if $wts is not None and $wts != ''
issued on $wts
#end if
#if $show_tides and len($tides) > 0
#if $show_tides and $tides is not None and len($tides) > 0
<br/>tides for $tides[0].location issued on $tides[0].issued_ts
#end if
#set $t1 = time.time()
Expand Down
14 changes: 8 additions & 6 deletions skins/exfoliation/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

## note: these thresholds are for millibar, not inHg
#def get_pressure_trend($x)
#if $x > 6
#if $x is None:
-
#elif $x > 6
&#8679;&#8679;&#8679;
#elif $x > 3
&#8679;&#8679;
Expand Down Expand Up @@ -46,9 +48,9 @@
#end def

#def get_windspeed_trend($x)
#if $x > 0
#if int($x) > 0
&#8679;
#elif $x < 0
#elif int($x) < 0
&#8681;
#end if
#end def
Expand Down Expand Up @@ -268,12 +270,12 @@
</td>
#if $fc_summary
<td class='metric_value'>
#if $fc_summary.pop.raw > 0
#if $fc_summary.pop.raw is not None and $fc_summary.pop.raw > 0
$fc_summary.pop.format('%.0f','')
#if $fc_summary.qpf.raw > 0
#if $fc_summary.qpf.raw is not None and $fc_summary.qpf.raw > 0
<br/>$fc_summary.qpf.nolabel('%.2f','') <img class='pop-img' src='icons/raindrop.png' />
#end if
#if $fc_summary.qsf.raw > 0
#if $fc_summary.qsf.raw is not None and $fc_summary.qsf.raw > 0
<br/>$fc_summary.qsf.nolabel('%.2f','') <img class='pop-img' src='icons/snowflake.png' />
#end if
#end if
Expand Down

0 comments on commit 19ec9af

Please sign in to comment.