kjgcoop / trilium-daily-note-toolkit
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
0.5.0
2026-09-15 07:29 UTC
Requires
- php: >=7.4.0
- kjgcoop/cli-logger: ^1.0
- kjgcoop/php-trilium-next-api: ^1.0
- vlucas/phpdotenv: ^5.5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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,.envloading (dotenv syntax, not INI), standardized log filename, andCliLogger/TriliumNextApiconstruction.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.