Skip to content

Basic usage

Entry point

All functionality is exposed through the rainlog program (see [project.scripts] in pyproject.toml). It is a Cyclopts application.

Global behaviour

  • rainlog --help — list subcommands
  • rainlog --version — package version
  • Most subcommands accept --db-dir (default: ~/.local/share/rainlog/). The database filename is always rainlog.sqlite under that path.

Subcommands at a glance

Command Purpose
rainlog add Insert a daily total (mm). Optional --date, --back-fill.
rainlog change Update an existing day's total.
rainlog graph Bar chart of rainfall totals (terminal).
rainlog rainy-days Bar chart of rainy-day counts per period (not mm).
rainlog weewx-import Copy daily rain from WeeWX SQLite into rainlog.sqlite.

Time buckets

Daily rows use a 24-hour window ending at 09:00 local time on the recorded calendar day. See Data model.

Further reading