paul@131 | 1 | #!/usr/bin/env python |
paul@131 | 2 | |
paul@131 | 3 | from email import message_from_string |
paul@131 | 4 | from MoinMessage import timestamp |
paul@131 | 5 | import sys |
paul@131 | 6 | |
paul@131 | 7 | if __name__ == "__main__": |
paul@131 | 8 | text = sys.stdin.read() |
paul@131 | 9 | |
paul@131 | 10 | message = message_from_string(text) |
paul@131 | 11 | timestamp(message) |
paul@131 | 12 | |
paul@131 | 13 | # Show the resulting message text. |
paul@131 | 14 | |
paul@131 | 15 | text = message.as_string() |
paul@131 | 16 | print text |
paul@131 | 17 | |
paul@131 | 18 | # vim: tabstop=4 expandtab shiftwidth=4 |