Skip to main content

statsbadge-clock

A clock and the weather, for statsbadge.

Six faces. A Swiss railway station clock with a smoothly sweeping second hand, Koppel's dotted minute track, the Amsterdam platform clock with a stop-to-go second hand, and a squircle which always uses the badge's theme. Then two digital faces, one set in the app's typeface and one in seven-segment digits over their unlit segments.

Railway Dots Squircle Digital Digital LCD

Weather comes from Open-Meteo: the condition with a symbol for the sky, temperature, what it feels like, humidity and the wind. No key and no account.

Install

statsbadge ext add clock
statsbadge install

Then add a Clock page in the config UI.

Settings

Set a Place under Extensions - a town or city, and a country after a comma if the name is a common one:

Sheffield          the one most people mean, by how well known it is
Sheffield, US      Alabama
Paris, US          Texas

Which one you got comes back as weather.place, so the Live panel shows it. Latitude and longitude reach a spot no name lands on, and win wherever both are set. Temperature reads in celsius or fahrenheit, wind in km/h, mph, m/s or knots.

Every clock page then has settings of its own, so two pages can show two cities. A place settles the time as well as the weather, since Open-Meteo returns a location's UTC offset with its forecast: point a page at Tokyo and it shows Tokyo's time, with no timezone to set anywhere. Each page picks a face:

Face What it is
railway Hilfiker's station clock in the Mondaine colourway, keeping its own livery
dots Koppel's dotted minute track, needle hands with a spike opposite each
amsterdam Navy oval marks over a minute track of dots, and a second hand that steps a revolution out in 57 seconds then waits at twelve for the minute
squircle The badge's furniture, in the page theme
digital No dial: date, place, the time the height of the band, weather under it
lcd The same layout in seven-segment digits, over their unlit segments

Quick add offers Digital Clock and Station Clock, which add a page with the face already picked. The other four faces are a dropdown away once a page is there.

Theme colours draws a stylised face in the page theme instead of its livery: the railway clock in Mondaine red, the Amsterdam navy and the Koppel black all give way to the theme's panel, ink, dim and accent. Squircle and the two digital faces are themed either way, so the setting doesn't affect them.

Without a place of its own the clock uses the badge's location from General Settings. With neither, it still keeps time, and the weather readouts read "no location set".

The same settings work from the command line, for a host with no browser near it. Anything stored by the UI wins over the flag.

statsbadge serve --extension clock.place=Sheffield
statsbadge serve --extension clock.latitude=53.38 --extension clock.longitude=-1.47

Notes

The hands run off the badge's clock, set once from the host, so they keep time when the host goes away and the second hand sweeps whether or not a reading has landed. A place name is looked up once ever, not once a launch, in the same cache every extension shares.

The seven segments are DSEG by keshikan, under the SIL Open Font License, whose text travels with the package.

Release files for statsbadge-clock 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsbadge-clock 2.0.0
File Size Uploaded
statsbadge_clock-2.0.0.tar.gz 37.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statsbadge-clock 2.0.0
File Interpreter ABI Platform
statsbadge_clock-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / statsbadge_clock-2.0.0.tar.gz

Download URL statsbadge_clock-2.0.0.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
feb9e3f90b682519a72a33bc0b314b849df49bbd4d0dd822feafec8ee4c26fa3
BLAKE2b-256 checksum
How to use checksums
2be0de529126ff5933cf6750dc00cc311596134dfaea7c9af3fc8bbb20e26ded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / statsbadge_clock-2.0.0-py3-none-any.whl

Download URL statsbadge_clock-2.0.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2497d985908171a5e651f3568e2e5f035dafe5a89b8fb31f1b499c576706b320
BLAKE2b-256 checksum
How to use checksums
7826b14d51407364186c850443f8317923517080f65e1d9a9e3bd4736d36dcce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page