Skip to content

Version 2.1 beta 4 -- bug fixes, badges, power user features

Pre-release
Pre-release

Choose a tag to compare

@uajqq uajqq released this 03 Aug 23:18
970baaa

New feature: labels in charts.conf

This beta adds support for using labels in charts.conf. This can be useful for those who like to serve two different versions of the skin in two different languages.

The syntax is ${your_label}. The brackets are to make it explicit that this is not a Cheetah tag -- the text is replaced manually by Python, since otherwise we'd have to change everything to .tmpl files.

You can define a chart group using labels like this:

[day]
    title = ${chart_day_title}
    button_text = ${chart_day_button}

    [[chart1]]
        title = ${chart_temperature_title}
        [[[outTemp]]]
            name = ${chart_outtemp_series}

And then run two reports, with two different translations:

[StdReport]

    [[new-belchertown-en]]
        skin = new-belchertown
        HTML_ROOT = public_html/en
        enable = true
        lang = en

        [[[Extras]]]
            forecast_lang = en
            site_title = "My Weather Website"

        [[[Labels]]]
            [[[[Generic]]]]
                chart_day_title = "Today"
                chart_day_button = "Day"
                chart_temperature_title = "Temperature"
                chart_outtemp_series = "Temperature"

    [[new-belchertown-fr]]
        skin = new-belchertown
        HTML_ROOT = public_html/fr
        enable = true
        lang = fr

        [[[Extras]]]
            forecast_lang = fr
            site_title = "Mon site météo"

        [[[Labels]]]
            [[[[Generic]]]]
                chart_day_title = "Aujourd'hui"
                chart_day_button = "Jour"
                chart_temperature_title = "Température"
                chart_outtemp_series = "Température"

Other minor new features:

  • Skin now automatically calculates outWetBulb if not already present in database
  • AQI source is now configurable: aqi_source = auto by default (uses local data if available, then falls back to forecast). Can also be set to local (force reading data from database) or forecast (force reading data from forecast).
  • AQI now has a small color badge next to it with the appropriate color, instead of coloring the entire text
  • Alerts are now badge-style instead of underlined text, with color coding (red for active, grey for pending)
  • Database queries are now cached when able, to reduce execution time on very large databases
  • Highcharts no longer uses its default grouping (which can be inaccurate) except for very large data sources

Bug fixes / improvements

  • Fix for occasionally missing charts / forecast
  • Charts now refresh when the page regains focus (if it's been in the background)
  • More fixes to inaccurate records
  • Visual cleanups
  • Alert start/end times are more accurate
  • Fix for persistent missing "raw" values in JSON, thank you @pablos-here
  • Fix for pixellated Highcharts dark mode text
  • Translated Highcharts drop-down menus
  • Fix for stale Windy or earthquake data
  • Fixes for malformed units and units not translating appropriately