2015-10-18 | Paul Boddie | raw annotate files changeset graph | Improved the time navigation, storing the current period in form fields so that other state information can be maintained while navigating between periods. Expanded the day padding to fill the current period instead of just the days between those containing events. Fixed the availability of the period selection reset button. |
1 #!/usr/bin/env python 2 3 from email import message_from_file 4 import sys 5 6 def decode(part): 7 for key, value in part.items(): 8 if key != "Content-Transfer-Encoding": 9 print "%s: %s" % (key, value) 10 print 11 decoded = part.get_payload(decode=True) 12 if decoded: 13 print decoded 14 print 15 else: 16 for part in part.get_payload(): 17 decode(part) 18 19 message = message_from_file(sys.stdin) 20 decode(message) 21 22 # vim: tabstop=4 expandtab shiftwidth=4