Question

I'm looking to automate the status reports that I have to send to my manager. Since I use a to-do software that writes to iCalendar format, I would like be able to format an email out of the ics file.

I'm starting my work with: http://codespeak.net/icalendar/ which looks pretty good, but it does have some rough edges.

What iCalendar reader would you suggest for python?

Was it helpful?

Solution

I know this question is old, but this looks to be the most popular Python iCalendar parser these days. It's available on Pypi.

Pypi page: https://pypi.python.org/pypi/icalendar
Documentation: http://icalendar.readthedocs.org/en/latest/
Github: https://github.com/collective/icalendar

OTHER TIPS

There is ics.py which has a very "pythonic" interfaces and abstracts away the not very intuitive syntax of the iCalendar format RFC5545.

Example:

>>> from ics import Calendar, Event
>>> from datetime import datetime
>>> c = Calendar()
>>> e = Event()
>>> e.name = "My cool event"
>>> e.begin = '20140101 10:00:00'
>>> e.end = datetime(2014, 1, 1, 11, 30)
>>> c.events.append(e)
>>> c.events
[<Event 'My cool event' begin:2014-01-01 10:00:00 end:2014-01-01 11:30:00>]
>>> with open('my.ics', 'w') as my_file:
>>>     my_file.writelines(c)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top