Something went wrong. Try again.
Command-line and Emacs Calendar Client
Something went wrong. Try again.
OCaml
at timezone-cli
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071(** Unified component handling for events, todos, and journals *)
type component_type = CEvent | CTodo | CJournal
type t
val component_type : t -> component_typeval of_event : Event.t -> tval of_todo : Todo.t -> tval of_journal : Journal.t -> t
val to_event : t -> Event.t optionval to_todo : t -> Todo.t optionval to_journal : t -> Journal.t option
val get_id : t -> stringval get_summary : t -> string optionval get_description : t -> string optionval get_categories : t -> string listval get_calendar_name : t -> stringval get_file : t -> Eio.Fs.dir_ty Eio.Path.tval get_alarms : t -> Icalendar.alarm listval get_start : t -> Ptime.t option
val to_ical_component : t -> Icalendar.componentval to_ical_calendar : t -> Icalendar.calendar
val components_of_icalendar : string -> file:Eio.Fs.dir_ty Eio.Path.t -> Icalendar.calendar -> t list
(** Comparators *)type comparator = t -> t -> int
val by_start : comparatorval by_summary : comparatorval by_calendar_name : comparatorval by_type : comparatorval descending : comparator -> comparatorval chain : comparator -> comparator -> comparator
(** Filters *)type filter = t -> bool
val is_type : component_type -> filterval summary_contains : string -> filterval description_contains : string -> filterval in_calendars : string list -> filterval has_categories : string list -> filterval and_filter : filter list -> filterval or_filter : filter list -> filterval not_filter : filter -> filter
(** Formatting *)type format = [ `Text | `Entries | `Json | `Csv | `Ics | `Sexp ]
val format_component : ?format:format -> ?tz:Timedesc.Time_zone.t -> t -> stringval format_components : ?format:format -> ?tz:Timedesc.Time_zone.t -> ?get_color:(string -> string option) -> t list -> string
val sexp_of_t : t -> Sexplib0.Sexp.t
(** Alarm fire times *)
type alarm_fire = { fire_time : Ptime.t; component : t; alarm : Icalendar.alarm;}
val query_alarm_fires : from:Ptime.t option -> to_:Ptime.t -> t list -> alarm_fire list(** Query all alarm fire times within a date range, sorted by fire time. *)