ics Calendar files

What are the recommended ways of handling .ics calendar files on FreeBSD?
Good question! I guess, it depends on what are you using them for.
There are some Python-based solutions, e.g. a fully functional deskutils/py-khal, but I hate installing 80MB+ packages just to read start/end time I need when I get a .ics file.
I'm using a simple Python script which requires devel/py-icalendar:
Code:
import sys
from icalendar import Calendar, Event

ics_file = open(sys.argv[1],'r')
cal = Calendar.from_ical(ics_file.read())
for item in cal.walk('vevent'):
    print("Summary:", item.get('summary'))
    print("item.get('description'))
    print("Start:  ", item.decoded('dtstart').strftime("%a, %b %d, %Y %H:%M %Z"))
    print("End:    ", item.decoded('dtend').strftime("%a, %b %d, %Y %H:%M %Z"))
ics_file.close()
 
Back
Top