]>
git.rmz.io Git - dotfiles.git/blob - mutt/ical2txt
b8e50a2d76656bbd2c59f110478d4e3f1cbfa66f
3 from icalendar
import Calendar
6 start
= event
.get('dtstart').dt
7 end
= event
.get('dtend').dt
8 str = "Start: {:%Y-%m-%d %H:%M}\n".format(start
.astimezone())
9 str += "End: {:%Y-%m-%d %H:%M}\n".format(end
.astimezone())
11 if event
.get('attendee') is not None:
12 att
= event
.get('attendee')
13 if not isinstance(att
, list):
15 attendees
= [ a
.params
['cn'] for a
in att
]
18 str += "\t{}\n".format(a
)
21 description
= event
.get('description')
22 if description
is not None:
28 with open('/dev/stdin', 'r') as f
:
29 cal
= Calendar
.from_ical(f
.read())
32 if c
.name
== "VEVENT":