Search by

kjgcoop / trilium-daily-note-toolkit

kjgcoop

Shared bootstrap and idempotent-section-append helpers for the trilium-* daily-note scripts.

Package info

github.com/kjgcoop/trilium-daily-note-toolkit

pkg:composer/kjgcoop/trilium-daily-note-toolkit

Statistics

Installs: 27

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.5.0 2026-09-15 07:29 UTC

This package is auto-updated.

Last update: 2026-09-15 07:31:33 UTC


README

Shared bootstrap and idempotent-section-append helpers for the trilium-* daily-note scripts (trilium-weather, trilium-moon-phase, trilium-plans, trilium-taskfiend, trilium-taskfiend-after, trilium-post-fmtd-text, trilium-tarot), factored out to stop the copy-paste drift between them.

  • ScriptContext::fromCli($argv, $topic) — CLI date-arg validation, .env loading (dotenv syntax, not INI), standardized log filename, and CliLogger/TriliumNextApi construction.
  • DailySection::addIfMissing(...) — the "does today's note already have this heading; if not, build and append the fragment" pattern.
  • Text::truncate($text, $maxLen) — trim-to-first-line-then-hard-truncate used for task descriptions.
  • Html::todoCheckboxItem($label) — the disabled-checkbox <li> template used by the taskfiend scripts.

See ../.env.example (one level up, shared by all the trilium-* repos) for the full list of environment variables these scripts expect.