2014-01-12 | Paul Boddie | raw annotate files changeset graph | Updated the action to use the MessageInterface abstraction. Made the getfiles script use the command language. Introduced specific content types for command sequences and responses. Reversed the order of operations in the getfiles script to be compatible with the action (so that signing occurs before encryption). |
1 #!/usr/bin/env python 2 3 from MoinMessage import GPG 4 from email.parser import Parser 5 import sys 6 7 if __name__ == "__main__": 8 keyid = sys.argv[1] 9 message = Parser().parse(sys.stdin) 10 11 gpg = GPG() 12 text = gpg.encryptMessage(message, keyid) 13 14 # Show the resulting message text. 15 16 print text 17 18 # vim: tabstop=4 expandtab shiftwidth=4