--- /dev/null
+#!/usr/bin/env python3
+
+from icalendar import Calendar
+
+def format_cal(start, end, description):
+ str = "Start: {:%Y-%m-%d %H:%M}\n".format(start)
+ str += "End: {:%Y-%m-%d %H:%M}\n\n".format(end)
+ if description is not None:
+ str += description
+
+ return str
+
+
+with open('/dev/stdin', 'r') as f:
+ cal = Calendar.from_ical(f.read())
+
+for c in cal.walk():
+ if c.name == "VEVENT":
+ print(format_cal(
+ c.get('dtstart').dt,
+ c.get('dtend').dt,
+ c.get('description')))
text/html; $XDG_CONFIG_HOME/mutt/mutt_bgrun qutebrowser %s; test=test -n "$DISPLAY"; nametemplate=%s.html
text/html; w3m -I %{charset} -dump %s -T text/html -cols "$COLUMNS" -o display_link_number=1; copiousoutput; nametemplate=%s.html
+text/calendar; $XDG_CONFIG_HOME/mutt/ical2txt; copiousoutput
application/*; $XDG_CONFIG_HOME/mutt/mutt_bgrun rifle -f F %s;
image/*; rifle -f F %s;