- Rename executable public_name and package name from remind_sync to ical2rem - Update dune-project with new name, source URI, maintainer, synopsis, description, and tags - Add dune-build-info dependency and use Build_info to generate the version string at build time instead of the %%VERSION%% placeholder - Add pinned dependencies to ical2rem.opam - Remove remind_sync.opam - Bump dune lang version from 3.20 to 3.23
26 lines
744 B
OCaml
26 lines
744 B
OCaml
open Cmdliner
|
|
open Cmdliner.Term.Syntax
|
|
|
|
let version_string () =
|
|
match Build_info.V1.version () with
|
|
| None -> "dev"
|
|
| Some v -> Build_info.V1.Version.to_string v
|
|
|
|
let files =
|
|
let doc = "Files to process" in
|
|
Arg.(non_empty & pos_all string [] & info [] ~docv:"FILE" ~doc)
|
|
|
|
let timezone =
|
|
let doc = "Target timezone for output (e.g. Europe/Rome). Defaults to local timezone." in
|
|
Arg.(value & opt (some string) None & info [ "timezone"; "z" ] ~docv:"TZ" ~doc)
|
|
|
|
let main_command f =
|
|
let doc = "Convert iCalendar files to remind format" in
|
|
let man = [] in
|
|
Cmd.make (Cmd.info "ical2rem" ~version:(version_string ()) ~doc ~man)
|
|
@@
|
|
let+ files = files and+ tz = timezone in
|
|
f tz files
|
|
|
|
let main f = Cmd.eval @@ main_command f
|