Files
ical2rem/bin/commandLine.ml
Paolo Donadeo 85733544f6 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:19:54 +02:00

17 lines
397 B
OCaml

open Cmdliner
open Cmdliner.Term.Syntax
let files =
let doc = "Files to process" in
Arg.(non_empty & pos_all string [] & info [] ~docv:"FILE" ~doc)
let main_command f =
let doc = "Convert iCalendar files to remind format" in
let man = [] in
Cmd.make (Cmd.info "ical2rem" ~version:"%%VERSION%%" ~doc ~man)
@@
let+ files = files in
f files
let main f = Cmd.eval @@ main_command f