Thanks. 

More on the skin i'm working on :

I was reading the weewx customization guide and found I can specify the 
StringFormats of my units in my skin.conf. So technically when I generate a 
report with the cheetah engine in my skin the string should format itself 
to the format I have specified in the skin.conf file right ? 

Because at the moment the formatting applied in my skin is the defaut one 
of the weewx.conf. Am I missing something here ?

Skin.conf :

[Unit]
   [[Groups]]
       group_altitude     = meter                # Options are 'foot' or 
'meter'
       group_degree_day   = degree_C_day         # Options are 
'degree_F_day' or 'degree_C_day'
       group_direction    = degree_compass
       group_distance     = km                   # Options are 'mile' or 
'km'
       group_moisture     = centibar
       group_percent      = percent
       group_pressure     = hPa                  # Options are 'inHg', 
'mmHg', 'mbar', or 'hPa'
       group_radiation    = watt_per_meter_squared
       group_rain         = mm                   # Options are 'inch', 
'cm', or 'mm'
       group_rainrate     = mm_per_hour          # Options are 
'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
       group_speed        = km_per_hour          # Options are 
'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
       group_speed2       = km_per_hour2         # Options are 
'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
       group_temperature  = degree_C             # Options are 'degree_F' 
or 'degree_C'
       group_uv           = uv_index
       group_volt         = volt

    [[StringFormats]]
       NONE                = "---"
       degree_C            = %.2f
       percent             = %.1f
       km_per_hour         = %.1f
       km_per_hour2        = %.1f
       km                  = %.2f
       mm_per_hour         = %.1f
       mm                  = %.2f
       meter_per_second    = %.1f
       hPa                 = %.1f
       mile_per_hour       = %.1f

    [[Ordinates]]
       # The ordinal directions. The last one should be for no wind 
direction
       directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, 
WNW, NW, NNW, ---

[CheetahGenerator]
   encoding = utf8
   search_list_extensions = user.extrastats.ExtraStats

    [[NOAA_PRYR]]
       encoding = strict_ascii
       template = NOAAPRYR.TXT.tmpl

    [[NOAA_YR]]
       encoding = strict_ascii
       template = NOAAYR.TXT.tmpl

    [[NOAA_PRMO]]
       encoding = strict_ascii
       template = NOAAPRMO.TXT.tmpl

    [[NOAA_MO]]
       encoding = strict_ascii
       template = NOAAMO.TXT.tmpl

    [[Downld02]]
       template = downld02.txt.tmpl

    [[Downld08]]
       template = downld08.txt.tmpl

    [[Xml]]
       template = xml.xml.tmpl

    [[Current]]
       template = current.htm.tmpl

[Generators]
       # The list of generators that are to be run:
       generator_list = weewx.cheetahgenerator.CheetahGenerator, 
weewx.reportengine.FtpGenerator

Report :

#errorCatcher Echo
#import weewx.uwxutils as utils
#import user.weathercalc as wc
#set $D="%d/%m/%y"
#set $Time="%I:%M%p" 
#def formatTime($raw):
#from datetime import datetime
#echo $datetime.fromtimestamp($raw
).strftime("%-I:%M%p").lower().rstrip('m').rjust(6)
#end def
                 Temp     Hi    Low   Out    Dew  Wind  Wind   Wind    Hi   
 Hi   Wind   Heat    THW                Rain    Heat    Cool    In     In   
 In     In     In   In Air  Wind  Wind    ISS   Arc.
 Date    Time     Out   Temp   Temp   Hum    Pt. Speed   Dir    Run Speed   
Dir  Chill  Index  Index   Bar    Rain  Rate    D-D     D-D    Temp   Hum   
 Dew   Heat    EMC Density  Samp   Tx   Recept  Int.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#for $_span in $last2days
$_span.end.format($D) #slurp ## DATE
$self.formatTime($_span.end.raw) #slurp ## TIME
$_span.outTemp.avg.format(add_label=False).rjust(6) #slurp ## TEMP OUT
$_span.outTemp.max.format(add_label=False).rjust(6) #slurp ## HI TEMP
$_span.outTemp.min.format(add_label=False).rjust(6) #slurp ## LOW TEMP
$_span.outHumidity.avg.format(add_label=False).rjust(5) #slurp ## OUT HUM
$_span.dewpoint.avg.format(add_label=False).rjust(6) #slurp ## DEW PT.
$_span.windSpeed.avg.format(format_string="%.1f",add_label=False).rjust(5) 
#slurp ## WIND SPEED
$_span.windDir.avg.ordinal_compass.rjust(5) #slurp ## WIND DIR
$_span.windrun.sum.format(add_label=False).rjust(6) #slurp ## WIND RUN
$_span.windSpeed.max.format(format_string="%.1f",add_label=False).rjust(5) 
#slurp ## HI SPEED
$_span.windDir.max.ordinal_compass.rjust(5) #slurp ## HI DIR
$_span.windchill.avg.format(add_label=False).rjust(6) #slurp ## WIND CHILL
$_span.heatindex.avg.format(add_label=False).rjust(6) #slurp ## HEAT INDEX
$wc.CalculateTHWIndex($_span.heatIndex.avg.raw,$span.windSpeed.avg.raw).rjust(6)
 
#slurp ## THW INDEX 
$_span.barometer.avg.format(add_label=False).rjust(7) #slurp ## BAR
$_span.rain.sum.format(add_label=False).rjust(5) #slurp ## RAIN
$_span.rainRate.avg.format(add_label=False).rjust(5) #slurp ## RAIN RATE
$_span.heatdeg.avg.format(add_label=False).rjust(7) #slurp ## HEAT D-D
$_span.cooldeg.avg.format(add_label=False).rjust(7) #slurp ## COOL D-D
$_span.inTemp.avg.format(add_label=False).rjust(6) #slurp ## IN TEMP
$_span.inHumidity.avg.format(add_label=False).rjust(5) #slurp ##IN HUM
$wc.CalculateDewPoint($_span.inTemp.avg.raw,$_span.inHumidity.avg.raw).rjust(6) 
#slurp ## IN DEW
$wc.CalculateHeatIndex($_span.inTemp.avg.raw,$_span.inHumidity.avg.raw).rjust(6)
 
#slurp ## IN HEAT
$wc.CalculateEMC($_span.inTemp.avg.raw,$_span.inHumidity.avg.raw).rjust(6) 
#slurp ## IN EMC
$wc.CalculateAirDensity($_span.inTemp.avg.raw,$_span.barometer.avg.raw).rjust(6)
 
#slurp ## IN AIR DENSITY
    0 #slurp ## WIND SAMPLES
  7 #slurp ## TRANSMITTER ID
$_span.rxCheckPercent.avg.format(format_string="%.1f",add_label=False).rjust(8) 
#slurp ## IIS RECEPTION QUALITY
 15 ## ARCHIVE INTERVAL
#end for

Output : 

                  Temp     Hi    Low   Out    Dew  Wind  Wind   Wind    Hi 
   Hi   Wind   Heat    THW                Rain    Heat    Cool    In     In 
   In     In     In   In Air  Wind  Wind    ISS   Arc.
  Date    Time     Out   Temp   Temp   Hum    Pt. Speed   Dir    Run Speed 
  Dir  Chill  Index  Index   Bar    Rain  Rate    D-D     D-D    Temp   Hum 
   Dew   Heat    EMC Density  Samp   Tx   Recept  Int.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

09/05/20 12:15a    1.2    1.2    1.1    55   -6.9   5.4    NW    1.3   6.4 
   NW    0.5    1.2   31.8  1008.1   0.0   0.0    16.6     0.0   19.9    45 
   7.6   19.9   8.56 1.2067      0    7     92.0   15 
09/05/20 12:30a    1.1    1.1    1.1    53   -7.3   5.4    NW    1.3   6.4 
   NW    0.4    1.1   31.6  1008.2   0.0   0.0    16.6     0.0   19.8    45 
   7.5   19.8   8.56 1.2072      0    7     99.9   15 
09/05/20 12:45a    0.9    1.0    0.9    53   -7.6   4.8    NW    1.2   4.8 
   NW    0.9    0.9   31.3  1008.2   0.0   0.0    16.6     0.0   19.8    45 
   7.5   19.8   8.56 1.2075      0    7     99.9   15 
09/05/20  1:00a    0.8    0.8    0.8    53   -7.7   5.4    NW    1.3   6.4 
   NW    0.2    0.8   31.1  1008.2   0.0   0.0    16.6     0.0   19.7    45 
   7.5   19.7   8.56 1.2076      0    7     88.8   15 
09/05/20  1:15a    0.8    0.8    0.8    52   -8.0   6.4    NW    1.6   6.4 
   NW   -1.3    0.8   31.0  1008.3   0.0   0.0    16.6     0.0   19.6    45 
   7.3   19.6   8.56 1.2082      0    7     99.9   15 
09/05/20  1:30a    0.7    0.8    0.7    51   -8.2   6.4    NW    1.6   6.4 
   NW   -1.3    0.7   31.0  1008.4   0.0   0.0    16.6     0.0   19.5    45 
   7.3   19.5   8.57 1.2086      0    7     95.0   15 
09/05/20  1:45a    0.6    0.7    0.6    51   -8.3   7.5    NW    1.9   8.0 
   NW   -1.8    0.6   30.8  1008.3   0.0   0.0    16.6     0.0   19.5    45 
   7.3   19.5   8.57 1.2086      0    7     86.2   15 
09/05/20  2:00a    0.5    0.6    0.5    50   -8.7   8.6    NW    2.1   9.7 
   NW   -2.3    0.5   30.6  1008.4   0.0   0.0    16.6     0.0   19.5    45 
   7.2   19.5   8.57 1.2090      0    7     99.9   15 
09/05/20  2:15a    0.4    0.4    0.3    50   -8.8   6.4    NW    1.6   8.0 
   NW   -1.2    0.4   30.3  1008.5   0.0   0.0    16.6     0.0   19.4    45 
   7.2   19.4   8.57 1.2093      0    7     99.6   15 
09/05/20  2:30a    0.4    0.4    0.3    50   -8.8   8.6    NW    2.1   9.7 
   NW   -2.4    0.4   30.3  1008.5   0.0   0.0    16.6     0.0   19.3    45 
   7.1   19.3   8.57 1.2096      0    7     99.9   15 
09/05/20  2:45a    0.3    0.3    0.2    51   -8.7   8.6    NW    2.1   9.7 
   NW   -2.6    0.3   30.1  1008.5   0.0   0.0    16.6     0.0   19.3    45 
   7.0   19.3   8.57 1.2098      0    7     99.9   15 
09/05/20  3:00a    0.1    0.2   -0.1    52   -8.5   3.8    NW    0.9   6.4 
   NW   -0.7    0.1   29.7  1008.5   0.0   0.0    16.6     0.0   19.2    45 
   7.0   19.2   8.57 1.2100      0    7     99.2   15 

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9fb36d12-a36c-4e7d-93ba-1dc94bab233a%40googlegroups.com.

Reply via email to