paul@10 | 1 | #!/usr/bin/env python |
paul@10 | 2 | |
paul@10 | 3 | from MoinMessage import GPG |
paul@10 | 4 | from email.parser import Parser |
paul@10 | 5 | import sys |
paul@10 | 6 | |
paul@10 | 7 | if __name__ == "__main__": |
paul@10 | 8 | message = Parser().parse(sys.stdin) |
paul@10 | 9 | declaration, content = message.get_payload() |
paul@10 | 10 | |
paul@10 | 11 | gpg = GPG() |
paul@10 | 12 | text = gpg.decryptMessage(content.get_payload()) |
paul@10 | 13 | |
paul@10 | 14 | # Show the resulting message text. |
paul@10 | 15 | |
paul@10 | 16 | print text |
paul@10 | 17 | |
paul@10 | 18 | # vim: tabstop=4 expandtab shiftwidth=4 |