Generate Daily reports through scriptorium

This commit is contained in:
2026-05-29 17:47:42 +00:00
parent 7ac73f758b
commit b17a3591e0
14 changed files with 543 additions and 113 deletions

View File

@@ -1,21 +1,23 @@
# Weatherreporter CLI
`weatherreporter generate daily` currently writes managed Daily preparation
artifacts under the configured workspace and runs `scriptorium render` as a
preflight check. Other report generation and scheduled runs still resolve
configuration, report definitions, and valid periods, then return a
not-implemented error.
`weatherreporter generate daily` currently writes a Daily Markdown report
through `scriptorium`, after writing managed preparation artifacts and running
`scriptorium render` as a preflight check. Other report generation and scheduled
runs still resolve configuration, report definitions, and valid periods, then
return a not-implemented error.
## Shortest Useful Command
```sh
weatherreporter generate daily --date 2026-05-29 --out ./daily.data_package.json
weatherreporter generate daily --date 2026-05-29 --out ./daily.md
```
The command parses flags, loads configuration, fetches weather data, builds a
Daily briefing, writes workspace artifacts, and invokes
`scriptorium render --input data_package=<managed_path> --format json`. When
`--out` is supplied, it also writes a copy of the data package to that path.
Daily briefing, writes workspace artifacts, invokes
`scriptorium render --input data_package=<managed_path> --format json`, then
invokes `scriptorium run --input data_package=<managed_path> --out <managed_report>`.
When `--out` is supplied, it also writes a copy of the Markdown report to that
path.
## Command Overview
@@ -30,10 +32,10 @@ weatherreporter run evening
```
`generate daily` writes a briefing snapshot, prompt input data package, render
preflight output, and metadata file under the configured workspace. Other
`generate` commands resolve one report request and stop before report
generation. `run` commands resolve a scheduled batch request and stop before
execution.
preflight output, Markdown report, and metadata file under the configured
workspace. Other `generate` commands resolve one report request and stop before
report generation. `run` commands resolve a scheduled batch request and stop
before execution.
## Flags
@@ -41,7 +43,7 @@ execution.
- `--config PATH`: load configuration from `PATH` instead of `/usr/local/etc/weatherreporter/config.yml`.
- `--units VALUE`: override configured Weather API units.
- `--tz NAME`: override configured Weather API timezone.
- `--out PATH`: optional extra data package copy for `generate daily`; reserved for later generated report output on other `generate` commands.
- `--out PATH`: optional Markdown report copy for `generate daily`; reserved for later generated report output on other `generate` commands.
- `--date YYYY-MM-DD`: optional date for `generate daily`; defaults to the current local date in the configured timezone.
- `--start TIME`: required start time for `generate storm`.
- `--end TIME`: required end time for `generate storm`.