Upgrade now results in a minimum [[Defaults]] section.

This commit is contained in:
Tom Keffer
2021-12-17 07:28:32 -08:00
parent 34140e584d
commit fdcfdb976d
2 changed files with 41 additions and 154 deletions

View File

@@ -1017,7 +1017,8 @@ def update_to_v39(config_dict):
- New top-level options log_success and log_failure
- New subsections [[SeasonsReport]], [[SmartphoneReport]], and [[MobileReport]]
- New section [StdReport][[Defaults]]
- New section [StdReport][[Defaults]]. Prior to V4.6, it had lots of entries. With the
introduction of V4.6, it has been pared back to the minimum.
"""
major, minor = get_version_info(config_dict)
@@ -1904,166 +1905,52 @@ MOBILE_REPORT = """[StdReport]
enable = false
HTML_ROOT = public_html/mobile"""
UNIT_DEFAULTS = """[StdReport]
DEFAULTS = """[StdReport]
####
# Various options for customizing your reports.
# Options in the [[Defaults]] section below will apply to all reports.
# What follows are a few of the more popular options you may want to
# uncomment, then change.
[[Defaults]]
# The following section determines the selection and formatting of units.
# Which language to use for all reports. Not all skins support all languages.
# You can override this for individual reports.
lang = en
# Which unit system to use for all reports. Choices are 'us', 'metric', or 'metricwx'.
# You can override this for individual reports.
unit_system = us
[[[Units]]]
# The following section sets what unit to use for each unit group.
# NB: The unit is always in the singular. I.e., 'mile_per_hour',
# NOT 'miles_per_hour'
[[[[Groups]]]]
group_altitude = foot # Options are 'foot' or 'meter'
group_degree_day = degree_F_day # Options are 'degree_F_day' or 'degree_C_day'
group_distance = mile # Options are 'mile' or 'km'
group_pressure = inHg # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
group_rain = inch # Options are 'inch', 'cm', or 'mm'
group_rainrate = inch_per_hour # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
group_speed = mile_per_hour # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
group_speed2 = mile_per_hour2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
group_temperature = degree_F # Options are 'degree_F' or 'degree_C'
"""
DEFAULTS = UNIT_DEFAULTS + """
# The following section sets the formatting for each type of unit.
[[[[StringFormats]]]]
centibar = %.0f
cm = %.2f
cm_per_hour = %.2f
degree_C = %.1f
degree_F = %.1f
degree_compass = %.0f
foot = %.0f
hPa = %.1f
hour = %.1f
inHg = %.3f
inch = %.2f
inch_per_hour = %.2f
km_per_hour = %.0f
km_per_hour2 = %.1f
knot = %.0f
knot2 = %.1f
mbar = %.1f
meter = %.0f
meter_per_second = %.1f
meter_per_second2 = %.1f
mile_per_hour = %.0f
mile_per_hour2 = %.1f
mm = %.1f
mmHg = %.1f
mm_per_hour = %.1f
percent = %.0f
second = %.0f
uv_index = %.1f
volt = %.1f
watt_per_meter_squared = %.0f
NONE = " N/A"
# The following section sets the label to be used for each type of unit
[[[[Labels]]]]
day = " day", " days"
hour = " hour", " hours"
minute = " minute", " minutes"
second = " second", " seconds"
NONE = ""
# The following section sets the format to be used for each time scale.
# The values below will work in every locale, but they may not look
# particularly attractive. See the Customization Guide for alternatives.
# Uncommenting the following section frequently results in more
# attractive formatting of times and dates, but may not work in
# your locale.
[[[[TimeFormats]]]]
# day = %H:%M
# week = %H:%M on %A
# month = %d-%b-%Y %H:%M
# year = %d-%b-%Y %H:%M
# rainyear = %d-%b-%Y %H:%M
# current = %d-%b-%Y %H:%M
# ephem_day = %H:%M
# ephem_year = %d-%b-%Y %H:%M
# The following line is used to keep the above lines indented properly.
# It can be ignored.
unused = unused
hour = %H:%M
day = %X
week = %X (%A)
month = %x %X
year = %x %X
rainyear = %x %X
current = %x %X
ephem_day = %X
ephem_year = %x %X
[[[[Ordinates]]]]
# 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, N/A
# The following section sets the base temperatures used for the
# calculation of heating and cooling degree-days.
[[[[[DegreeDays]]]]]
# Base temperature for heating days, with unit:
heating_base = 65, degree_F
# Base temperature for cooling days, with unit:
cooling_base = 65, degree_F
# A trend takes a difference across a time period. The following
# section sets the time period, and how big an error is allowed to
# still be counted as the start or end of a period.
[[[[[Trend]]]]]
time_delta = 10800 # 3 hours
time_grace = 300 # 5 minutes
# The labels to be used for each observation type
[[[Labels]]]
# Set to hemisphere abbreviations suitable for your location:
hemispheres = N, S, E, W
# Formats to be used for latitude whole degrees, longitude whole
# degrees, and minutes:
latlon_formats = "%02d", "%03d", "%05.2f"
# Generic labels, keyed by an observation type.
# Users frequently change the labels for these observation types
[[[[Generic]]]]
barometer = Barometer
dewpoint = Dew Point
ET = Evapotranspiration
heatindex = Heat Index
inHumidity = Inside Humidity
inTemp = Inside Temperature
outHumidity = Humidity
outTemp = Outside Temperature
radiation = Radiation
rain = Rain
rainRate = Rain Rate
UV = UV Index
windDir = Wind Direction
windGust = Gust Speed
windGustDir = Gust Direction
windSpeed = Wind Speed
windchill = Wind Chill
windgustvec = Gust Vector
windvec = Wind Vector
extraTemp1 = Temperature1
extraTemp2 = Temperature2
extraTemp3 = Temperature3
# inHumidity = Inside Humidity
# inTemp = Inside Temperature
# outHumidity = Outside Humidity
# outTemp = Outside Temperature
# extraTemp1 = Temperature1
# extraTemp2 = Temperature2
# extraTemp3 = Temperature3
# The following line is used to keep the above lines indented properly.
# It can be ignored.
unused = unused
# Sensor status indicators
rxCheckPercent = Signal Quality
txBatteryStatus = Transmitter Battery
windBatteryStatus = Wind Battery
rainBatteryStatus = Rain Battery
outTempBatteryStatus = Outside Temperature Battery
inTempBatteryStatus = Inside Temperature Battery
consBatteryVoltage = Console Battery
heatingVoltage = Heating Battery
supplyVoltage = Supply Voltage
referenceVoltage = Reference Voltage
[[[Almanac]]]
# The labels to be used for the phases of the moon:
moon_phases = New, Waxing crescent, First quarter, Waxing gibbous, Full, Waning gibbous, Last quarter, Waning crescent
"""

View File

@@ -263,7 +263,7 @@ version = 4.6.0b7
# current = %d-%b-%Y %H:%M
# ephem_day = %H:%M
# ephem_year = %d-%b-%Y %H:%M
# The following is used to keep the above lines indented properly.
# The following line is used to keep the above lines indented properly.
# It can be ignored.
unused = unused
@@ -277,7 +277,7 @@ version = 4.6.0b7
# extraTemp1 = Temperature1
# extraTemp2 = Temperature2
# extraTemp3 = Temperature3
# The following is used to keep the above lines indented properly.
# The following line is used to keep the above lines indented properly.
# It can be ignored.
unused = unused