Commit Graph

5 Commits

Author SHA1 Message Date
bc5abcc4fa 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-05-16 21:56:14 +02:00
4e2b6a61a2 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-05-15 23:12:51 +02:00
c78d94e004 refactor: replace predicate-based event matching with collector pipeline
- Simplify `.ocamlformat` to use `default` profile with fewer overrides
- Extract shared types and utilities into a `remind_sync` library
  (`icalendar_augmented`, `ptime_augmented`, `timedesc_augmented`,
  `result_augmented`, `utf8`)
- Replace `eventTransformer.ml` and the predicate system in
  `eventPredicates.ml` with a sequential collector pipeline
  (`collect_uuid`, `collect_summary`, `collect_start_end_duration`,
  etc.)
- Simplify `Remind.rem` to a flat record with `Timedesc` date/time
  fields and replace `rem_to_string` with a leaner `string_of_rem`
- Add `separate_master_and_recurrence` and `get_recurrence_id` helpers
  to `utils.ml`
- Wire `main.ml` to call `EventPredicates.remind_of_event` per UID group
  and print results directly
- Remove `eventTransformer` module from `bin/dune` and enable the
  `remind_sync` library dependency
2026-05-14 23:13:33 +02:00
fce66c5c78 refactor(predicates): return features instead of bool, add P00/P11 predicates
- Change predicate return type from `bool` to `features list option` to
  carry extracted event data (Summary, Day_start, Multi_day) alongside
  match results
- Add `features` type with Generic_feature_presence, Summary, Day_start,
  Multi_day variants
- Add P00 (has_summary) and P11 (override_events) predicates
- Remove large commented-out icalendar/ptime type definitions
- Refactor main.ml to group events by UID using a Map
- Add get_y_m_d_from_timedesc helper to Utils
2026-05-10 01:49:05 +02:00
83dfd0dfa9 feat: initial implementation of iCalendar to Remind converter
- Add project scaffolding (dune, dune-project, opam, .ocamlformat)
- Implement basic parsing and handling of iCalendar events
- Add event predicates for common event types (all-day, timed,
  recurrence, exceptions)
- Add transformation logic to map iCalendar events to Remind format
  (stub implementation)
- Provide utilities for extracting event details and converting
  dates/times
- Set up executable entrypoint and command-line interface using Cmdliner
- Include Remind event type definitions and helpers
2025-11-30 19:33:35 +01:00