feat: add streamd daily command and file_type dimension #88

Merged
kfickel merged 3 commits from 87_add-streamd-daily into main 2026-04-13 19:38:06 +02:00
Owner

Summary

  • Extracts a file_type prefix from filenames like 20260412-123456_daily.md"daily" and stores it as the file_type dimension on all localized shards (propagates to children).
  • Registers the file_type dimension in TaskConfiguration.
  • Adds streamd daily [YYYYMMDD] command: opens the earliest daily file (file_type=daily) whose moment falls within the target date, or creates a new <timestamp>_daily.md file if none exists. Date defaults to today in the configured timezone.

Commits

  1. feat(localize): add extract_file_type_from_file_name, wire into localize_stream_file, add file_type dimension to TaskConfiguration
  2. feat: add streamd daily CLI command
  3. docs: update README and REQUIREMENTS with file_type convention and daily command

Test plan

  • All existing tests pass (cargo test — 174 tests)
  • nix flake check passes (clippy, fmt, tests, pre-commit)
  • extract_file_type_from_file_name covered by 6 unit tests in localize::datetime
  • streamd daily (no args) opens today's daily file or creates one
  • streamd daily 20260412 opens the daily file for 2026-04-12

Closes #87

## Summary - Extracts a `file_type` prefix from filenames like `20260412-123456_daily.md` → `"daily"` and stores it as the `file_type` dimension on all localized shards (propagates to children). - Registers the `file_type` dimension in `TaskConfiguration`. - Adds `streamd daily [YYYYMMDD]` command: opens the earliest daily file (file_type=daily) whose moment falls within the target date, or creates a new `<timestamp>_daily.md` file if none exists. Date defaults to today in the configured timezone. ## Commits 1. `feat(localize)`: add `extract_file_type_from_file_name`, wire into `localize_stream_file`, add `file_type` dimension to `TaskConfiguration` 2. `feat`: add `streamd daily` CLI command 3. `docs`: update README and REQUIREMENTS with file_type convention and daily command ## Test plan - [ ] All existing tests pass (`cargo test` — 174 tests) - [ ] `nix flake check` passes (clippy, fmt, tests, pre-commit) - [ ] `extract_file_type_from_file_name` covered by 6 unit tests in `localize::datetime` - [ ] `streamd daily` (no args) opens today's daily file or creates one - [ ] `streamd daily 20260412` opens the daily file for 2026-04-12 Closes #87
kfickel added 3 commits 2026-04-13 19:33:37 +02:00
Add `extract_file_type_from_file_name` to parse prefixes like `_daily`
from filenames (e.g. `20260412-123456_daily.md` → `"daily"`).

Insert the result into `initial_location` in `localize_stream_file` so
all localized shards carry a `file_type` dimension value.

Also register the `file_type` dimension in `TaskConfiguration` so the
propagation contract is documented.
`streamd daily [YYYYMMDD]` opens the earliest existing daily file
(file_type=daily) whose timestamp falls within the target date.
If no such file exists it creates `<timestamp>_daily.md` and opens it.
Date defaults to today in the repository timezone.
docs: document file_type prefix convention and streamd daily command
All checks were successful
Release / Build and Release (push) Successful in 6s
Continuous Integration / Build Package (push) Successful in 44s
Continuous Integration / Lint, Check & Test (push) Successful in 1m9s
b8a73bfb3e
kfickel merged commit b8a73bfb3e into main 2026-04-13 19:38:06 +02:00
kfickel deleted branch 87_add-streamd-daily 2026-04-13 19:38:06 +02:00
Sign in to join this conversation.
No reviewers
No labels
planned
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: kfickel/streamd#88
No description provided.