Skip to content
Daveiano edited this page Mar 6, 2023 · 3 revisions

The skin supports generating a day-%Y-%m-%d.html file for every day in the archive (Thanks to @Jterrettaz for the suggestions in https://github.com/Daveiano/weewx-wdc/issues/67). These files can then be accesed via the statistics page:

Daily archive

How to enable

Comment out the lines around [[SummaryByDay]] (around line 250) in the skin.conf, it should look like this:

[CheetahGenerator]
    encoding = html_entities
    search_list_extensions = user.weewx_wdc.WdcGeneralUtil, user.weewx_wdc.WdcStatsUtil, user.weewx_wdc.WdcDiagramUtil, user.weewx_wdc.WdcCelestialUtil, user.weewx_wdc.WdcArchiveUtil, user.weewx_wdc.WdcTableUtil

    [[SummaryByDay]]
        [[[summary_day]]]
            template = day-archive/day-%Y-%m-%d.html.tmpl

The template name day-%Y-%m-%d.html.tmpl will be something like day-2021-03-13.html for the generated file name.

Note: If you want to change the date format of the template you also need to change the daily_archive TimeFormat in the skin.conf:

[Units]
    [[TimeFormats]]
        # @see https://weewx.com/docs/customizing.htm#Units_TimeFormats
        day        = %X
        week       = %x
        month      = %x
        year       = %x
        rainyear   = %x
        current    = %x %X
        ephem_day  = %X
        ephem_year = %x
        stats      = %x %X
        # CHANGE THIS ALSO:
        daily_archive = %Y-%m-%d