Skip to content

Skins and Reports

Scope: how the database becomes a website — the Seasons skin that a new station ships with, the three generators that build it, what actually lands in public_html, and the NOAA summaries that ride along.

A report is a job; a skin is its wardrobe and tools

Chapter 4 defined a report as a subsection of [StdReport]: a skin to use, an output directory, an enable flag. The skin is a folder under skins/ holding everything the report is made from — templates, styles, graph definitions, language files. A fresh station arrives with several: Seasons (the enabled default), Standard (the older look), Smartphone and Mobile (small-screen variants, disabled), and the two utility skins, Ftp and Rsync, which build nothing and carry files away instead (chapter 8).

After each archive record, the report engine runs every enabled report. For Seasons, the log shows the three generators at work:

weewxd: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 0.64 seconds
weewxd: INFO weewx.imagegenerator: Generated 18 images for report SeasonsReport in 0.18 seconds

CheetahGenerator fills templates with data; ImageGenerator draws the plots; CopyGenerator copies the static files (CSS, JavaScript, fonts) once. A cycle of the lab station — one minute, remember — cost under a second of each.

What lands in public_html

Check: the lab's output, one cycle after the station had a morning of weather:

public_html/                 648K in the first hour, growing slowly
    index.html          26,349 bytes — the front page
    statistics.html, tabular.html, telemetry.html, celestial.html
    NOAA/NOAA-2026.txt, NOAA/NOAA-2026-11.txt
    daybarometer.png, daytempdew.png, daywind.png, ... (15 day plots)
    month*.png, week*.png, year*.png as those periods fill in
    rss.xml, seasons.css, seasons.js, font/

And the proof that it is a website and not just a pile of files — the lab served the folder on the sandbox's loopback and fetched it back:

$ python3 -m http.server 18082 --bind 127.0.0.1 --directory public_html
$ curl -s -o /dev/null -w "%{http_code} %{size_download}\n" http://127.0.0.1:18082/index.html
200 26349
$ curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:18082/NOAA/NOAA-2026-11.txt
200

Any static web server does this job in real life — the station's util/ folder carries sample Apache and nginx configurations — because WeeWX's reports are plain files. There is no application server to secure, no login, nothing to patch but the pages themselves. It is an unfashionable architecture and a durable one.

The Seasons front page, read closely

index.html is assembled from the skin's index.html.tmpl plus included fragments (the .inc files in the skin: current.inc for the present conditions, hilo.inc for the day's extremes, sunmoon.inc and celestial.inc for the almanac, and more). The template language is Cheetah: $current.outTemp means "the latest record's outside temperature," $day.outTemp.max "today's highest," and formatting rides along — $current.outTemp renders as "32.7°F" because the report's unit settings say how a temperature should look. Chapter 9 builds a page of exactly this kind, small enough to see whole.

Two honest consequences follow from templates being programs. A template error fails that report, loudly, in the log — while the engine and the other reports carry on; and the front page is only ever as current as the last completed cycle, which is why its timestamps deserve a glance when a page looks stale (chapter 12).

The plots

ImageGenerator's definitions sit in the skin's skin.conf under [ImageGenerator]: which observations share a chart (daytempdew.png plots temperature and dewpoint together), the time spans (day, week, month, year), colours, and scales. The lab's first cycles produced 18 images; a later cycle produced 45, as the week and month plots acquired enough history to be worth drawing. Plots are regenerated when their period's data changes, not rebuilt wholesale every cycle — the generator keeps track — so an old station's per-minute cost stays small even with years on the clock.

The NOAA summaries

The plain-text files under NOAA/ are the oldest-looking and longest-lived output WeeWX makes: climatological summaries in the fixed-width style NOAA stations have published for a century, one per month and one per year. Check: the lab's first month, header and its one lived day:

                   MONTHLY CLIMATOLOGICAL SUMMARY for Nov 2026

NAME: Meadowbrook Hollow Test Station
ELEV: 920 feet    LAT: 39-03.00 N    LONG: 095-40.80 W

                   TEMPERATURE (F), RAIN (in), WIND SPEED (mph)
                                         HEAT   COOL         AVG
      MEAN                               DEG    DEG          WIND                   DOM
DAY   TEMP   HIGH   TIME    LOW   TIME   DAYS   DAYS   RAIN  SPEED   HIGH   TIME    DIR
---------------------------------------------------------------------------------------
 05   32.6   32.7  08:47   32.6  08:49   32.4    0.0   0.00    0.0    0.0  08:49    360

Every number in it traces to chapter 6: the high and low with their times are the daily summary tables, typeset; the heating degree-days (32.4 — a cold day, against a 65 °F base) are arithmetic on the mean. The coordinates came from [Station], degrees and decimal minutes, which is why chapter 4 insisted they were not decoration. These files are the ones weather people actually archive: a century from now they will still parse, which is more than the PNGs promise.

Changing the look

In ascending order of commitment: override options for a report in weewx.conf (units, labels, which skin); edit the skin's CSS; edit its templates; or install somebody else's skin entirely — which is an extension, and is chapter 9. The discipline that keeps this safe is the same one chapter 4 named: the station directory is yours, upgrades replace the program, and a skin you have edited is a skin you keep a copy of.