From 510f1786304189e994c94495efa744c32e232811 Mon Sep 17 00:00:00 2001 From: Paolo Donadeo Date: Sun, 24 May 2026 00:03:48 +0200 Subject: [PATCH] refactor: rename project from remind_sync to ical2rem - 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 --- bin/commandLine.ml | 7 ++++++- bin/dune | 3 ++- dune-project | 45 +++++++++++++++++++++++++++++++++++---------- ical2rem.opam | 38 ++++++++++++++++++++++++++++++++++++++ remind_sync.opam | 30 ------------------------------ 5 files changed, 81 insertions(+), 42 deletions(-) create mode 100644 ical2rem.opam delete mode 100644 remind_sync.opam diff --git a/bin/commandLine.ml b/bin/commandLine.ml index 7d37649..928f0d0 100644 --- a/bin/commandLine.ml +++ b/bin/commandLine.ml @@ -1,6 +1,11 @@ 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) @@ -12,7 +17,7 @@ let timezone = 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) + Cmd.make (Cmd.info "ical2rem" ~version:(version_string ()) ~doc ~man) @@ let+ files = files and+ tz = timezone in f tz files diff --git a/bin/dune b/bin/dune index 6ef7e63..cef7cf3 100644 --- a/bin/dune +++ b/bin/dune @@ -1,10 +1,11 @@ (executable - (public_name remind_sync) + (public_name ical2rem) (name main) (modules main commandLine remind eventPredicates utils windows_tz) (preprocess (pps ppx_deriving.show)) (libraries + dune-build-info cmdliner icalendar timedesc-tzdb.full diff --git a/dune-project b/dune-project index 3f269bb..f6761c9 100644 --- a/dune-project +++ b/dune-project @@ -1,24 +1,49 @@ -(lang dune 3.20) +(lang dune 3.23) -(name remind_sync) +(name ical2rem) (generate_opam_files true) (source - (uri https://git.donadeo.net/pdonadeo/remind-sync)) + (uri https://git.donadeo.net/pdonadeo/ical2rem)) (authors "Paolo Donadeo ") -(maintainers "Maintainer Name ") +(maintainers "Paolo Donadeo ") (license MIT) -(documentation https://git.donadeo.net/pdonadeo/remind-sync) +(documentation https://git.donadeo.net/pdonadeo/ical2rem) (package - (name remind_sync) - (synopsis "A short synopsis") - (description "A longer description") - (depends ocaml) + (name ical2rem) + (synopsis "Convert iCalendar (.ics) files to Remind (.rem) format") + (description + "ical2rem reads iCalendar (.ics) files and produces reminders in the Remind format. It handles recurring events, exceptions (EXDATE/RECURRENCE-ID), alarms (VALARM), timezones, and Windows timezone names.") + (depends + (ocaml + (= 5.4.1)) + (timedesc + (= 3.1.0)) + (timedesc-tzdb + (= 3.1.0)) + (timedesc-tzlocal + (= 3.1.0)) + (ppx_deriving + (= 6.1.1)) + (icalendar + (= 0.1.13)) + (dune + (and + :dev + (= 3.23.1))) + (ocamlformat + (and + :dev + (= 0.29.0))) + (ocaml-lsp-server + (and + :dev + (= 1.26.0)))) (tags - ("add topics" "to describe" your project))) + (icalendar remind calendar ics rem converter))) diff --git a/ical2rem.opam b/ical2rem.opam new file mode 100644 index 0000000..bb1707f --- /dev/null +++ b/ical2rem.opam @@ -0,0 +1,38 @@ +# This file is generated by dune, edit dune-project instead +opam-version: "2.0" +synopsis: "Convert iCalendar (.ics) files to Remind (.rem) format" +description: + "ical2rem reads iCalendar (.ics) files and produces reminders in the Remind format. It handles recurring events, exceptions (EXDATE/RECURRENCE-ID), alarms (VALARM), timezones, and Windows timezone names." +maintainer: ["Paolo Donadeo "] +authors: ["Paolo Donadeo "] +license: "MIT" +tags: ["icalendar" "remind" "calendar" "ics" "rem" "converter"] +doc: "https://git.donadeo.net/pdonadeo/ical2rem" +depends: [ + "ocaml" {= "5.4.1"} + "timedesc" {= "3.1.0"} + "timedesc-tzdb" {= "3.1.0"} + "timedesc-tzlocal" {= "3.1.0"} + "ppx_deriving" {= "6.1.1"} + "icalendar" {= "0.1.13"} + "dune" {>= "3.23" & dev & = "3.23.1"} + "ocamlformat" {dev & = "0.29.0"} + "ocaml-lsp-server" {dev & = "1.26.0"} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "https://git.donadeo.net/pdonadeo/ical2rem" +x-maintenance-intent: ["(latest)"] diff --git a/remind_sync.opam b/remind_sync.opam deleted file mode 100644 index a3dc098..0000000 --- a/remind_sync.opam +++ /dev/null @@ -1,30 +0,0 @@ -# This file is generated by dune, edit dune-project instead -opam-version: "2.0" -synopsis: "A short synopsis" -description: "A longer description" -maintainer: ["Maintainer Name "] -authors: ["Paolo Donadeo "] -license: "MIT" -tags: ["add topics" "to describe" "your" "project"] -doc: "https://git.donadeo.net/pdonadeo/remind-sync" -depends: [ - "dune" {>= "3.20"} - "ocaml" - "odoc" {with-doc} -] -build: [ - ["dune" "subst"] {dev} - [ - "dune" - "build" - "-p" - name - "-j" - jobs - "@install" - "@runtest" {with-test} - "@doc" {with-doc} - ] -] -dev-repo: "https://git.donadeo.net/pdonadeo/remind-sync" -x-maintenance-intent: ["(latest)"]