16 lines
576 B
OCaml
16 lines
576 B
OCaml
let default_implementation = Remind.make_default_event "TODO: implement conversion"
|
|
|
|
let remind_of_event (ev : Icalendar.event) : Remind.event =
|
|
let found =
|
|
ListLabels.fold_left ~init:[] EventPredicates.all_predicates ~f:(fun acc (pred, desc) ->
|
|
if pred ev then desc :: acc else acc)
|
|
|> List.rev
|
|
in
|
|
if List.length found > 0
|
|
then begin
|
|
Printf.printf " ⇒ matches these predicates:\n";
|
|
List.iter (fun d -> Printf.printf " - %s\n" (EventPredicates.show_event_description d)) found;
|
|
Printf.printf "\n"
|
|
end;
|
|
default_implementation
|