diff options
Diffstat (limited to 'src/ics.ml')
-rw-r--r-- | src/ics.ml | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -57,12 +57,19 @@ module Event = struct "END:VEVENT\n"] |> List.map ics_split_line |> String.concat "\n" + + let has_groups groups event = + List.fold_left (fun found group -> + found || List.exists ((=) group) groups) false event.groups end type t = Event.t list let make events = events +let filter_groups groups = + List.filter (Event.has_groups groups) + let gen_vtimezone tz = if tz <> "" then ["BEGIN:VTIMEZONE"; |