]> git.rmz.io Git - dotfiles.git/commitdiff
mutt/ical2txt: also print attendees
authorSamir Benmendil <me@rmz.io>
Thu, 24 Oct 2019 15:12:10 +0000 (16:12 +0100)
committerSamir Benmendil <me@rmz.io>
Thu, 24 Oct 2019 15:12:10 +0000 (16:12 +0100)
mutt/ical2txt

index de9d739e889b83d8b2836de85da020ea81ee991f..70a8be24e410bbaa27a634a6d747db3cef337bf0 100755 (executable)
@@ -8,6 +8,12 @@ def format_cal(event):
     str  = "Start: {:%Y-%m-%d %H:%M}\n".format(start.astimezone())
     str += "End:   {:%Y-%m-%d %H:%M}\n".format(end.astimezone())
 
+    attendees = [ a.params['cn'] for a in event.get('attendee') ]
+    str += "Attendees:\n"
+    for a in attendees:
+        str += "\t{}\n".format(a)
+    str += "\n"
+
     description = event.get('description')
     if description is not None:
         str += description