Commit Graph

12 Commits

Author SHA1 Message Date
d06a0d36ba docs/feat: add stdin support via - filename 2026-06-20 00:10:25 +02:00
4c443f088e fix: add backtrace recording and output on errors 2026-06-20 00:10:25 +02:00
db2adbfbbb feat(cli): add output control flags, sort order, and verbose mode
- Add `--verbose`/`-v` flag; gate all diagnostic stderr output behind it
- Add `--no-uuid`, `--no-source`, `--no-location`, `--no-description`,
  `--no-conference-url` flags to suppress individual INFO lines
- Add `--sort` option (`asc`, `desc`, `original`) replacing hardcoded
  descending sort
- Add `--source` option to override calendar name (single-file only)
- Introduce `Config` module with global `ref` flags set at startup from
  CLI args
- Add `Utils.warn` helper that writes to stderr only when
  `Config.verbose` is set
- Normalise all diagnostic messages to a consistent format (`Warning:
  ... (UID: ...)`)
- Remove `debug_print_of_recurrence_and_skip`; inline skip at each call
  site
- Fix `add_common_part` to always emit a trailing `\\\n    `
  continuation line
2026-06-20 00:10:25 +02:00
b549af2093 feat(alarms): collect VALARM trigger offsets from iCalendar events
- Add `triggers` field to `Remind.rem` type to store alarm trigger
  offsets as `Timedesc.Span.t list`
- Implement `get_triggers` in `Utils` to extract duration-based triggers
  from audio/display alarms, ignoring email and NONE alarms
- Add `collect_triggers` collector that populates the triggers field and
  logs them to stderr for debugging
- Register `collect_triggers` in the collector pipeline
- Remove leftover debug log for processed filenames in `main.ml`
- Remove stale commented-out RRULE dataset and type documentation from
  `simple_recurrence`
2026-06-20 00:10:25 +02:00
bb97fa5458 feat: add --timezone CLI option for configurable output timezone 2026-06-20 00:10:25 +02:00
2cf32525a2 feat: support EXDATE, DATE+DURATION, and weekly day inference
- Handle DATE+DURATION all-day events by computing end_date from
  duration
- Add PUSH/POP-OMIT-CONTEXT and OMIT/SKIP support for EXDATE in
  daily/weekly rendering
- Adjust UNTIL date when local time of UNTIL timestamp precedes event
  start time
- Default weekly RRULE to event's own weekday when BYDAY list is empty
- Remove EXDATE check from complex-recurrence guard (handled via OMIT
  now)
- Add timedesc_wd_to_ical weekday conversion utility
- Remove verbose EXDATE debug logging
- Fix minor newline in file processing log message
2026-06-20 00:10:25 +02:00
f8427394fa fix: sort reminders by date in descending order before output 2026-06-20 00:10:25 +02:00
7608ae696e feat: add source file tracking to rem type
Add a `source` field to `Remind.rem` to track the originating iCalendar
filename (basename without extension). Thread the basename through
`remind_of_event` so each reminder records which file it came from.
2026-06-20 00:10:25 +02:00
c5f5a5b446 refactor: remove remind_sync wrapper library and inline utilities
The `remind_sync` library was acting as a thin re-export layer. This
commit removes it entirely and moves the only non-trivial utility
(`show_error` for `Timedesc.Date.Ymd.error`) directly into
`bin/utils.ml`. Dead `[@@deriving show]` annotations on `rem`,
`week_first_day`, and `error` types are also removed.
2026-06-20 00:10:25 +02:00
cd03124c07 feat: implement simple weekly recurrence rendering
- Add `simple_weekly` type and `weekly` field to `rem` record
- Add `exdate` field to `rem` for excluded dates
- Add `collect_exdates` collector to pipeline
- implement weekly `RRULE` handling with `BYDAY`, `INTERVAL`,
  `COUNT`/`UNTIL`
- Add `render_weekly` to emit one `REM` per weekday with `UNTIL`/`*N`
- Replace `timedesc_of_date_or_datetime` with
  `timedesc_of_utc_or_timestamp_local` in utils
- Refactor `get_exdates`/`get_rdates` to separate dates, datetimes and
  periods; add debug logging per UID
- Wrap reminder output in try/catch in main; drop trailing newline
  duplication
- Mark implemented predicates (P00–P05, P09, P12, P14) with ;
  remove P18–P20 (ignored/deferred)
2026-06-20 00:10:25 +02:00
df4e17bc31 feat: support multiple input files
- Accept multiple positional arguments instead of a single required file
- Extract `read_file` helper to separate file reading from parsing
- Collect all valid reminders across files before printing
- Handle per-file errors gracefully without aborting the whole run
2026-06-20 00:10:25 +02:00
22f049ebb4 Initial commit 2026-06-20 00:10:09 +02:00