# icaltool - extract events from ical/vcal files. `icaltool` is a simple tool to extract events mathching a pattern from standard calendar files. It started out as a tool for myself to count the number of vacation days I had used from an ownCloud calendar. Since ownCloud didn't have the functionality, I downloaded the ics file, and wrote this tool to extract it myself. Hopefully it can be useful to others as well. ## Usage icaltool The pattern is a regular expression, optionally prefixed by the ical fields to match against and a colon. If the optional field name is left out, the regex is matched against all fields. ## Examples Find any event with 'vacation' somewhere in it's summary field: icaltool calendar.ics summary:vacation Find all events in 2018 starting on the 14th of the month icaltool calendar.ics dtstart:2018\\d{2}14 Find any event which mentions icaltool in any field: icaltool calendar.ics icaltool ## Limitations * Queries against more than one key is not supported at this time. * Timezones or other parameters are not taken into consideration. * The output format is not configurable, except by changing the code and recompiling it. The heavy lifting of parsing the ics files is done by the [ical crate](https://docs.rs/crate/ical). ## Contributing If you do find this tool useful, and have suggestions or even patches that will improve it, please [let me know](mailto:haraldei@anduin.net). `icaltool` is licensed as [GPLv3](https://www.gnu.org/licenses/gpl.txt), see the file LICENSE for the details.