2012-10-19 | Paul Boddie | raw annotate files changeset graph | Moved decryption and verification support into MoinMessage. Introduced a GPG class to hold common configuration information and provide a more natural programming interface. Added a setup script. |
1 #!/usr/bin/env python 2 3 import httplib 4 import sys 5 6 if __name__ == "__main__": 7 host = sys.argv[1] 8 path = sys.argv[2] + "?action=PostMessage" 9 10 text = sys.stdin.read() 11 12 req = httplib.HTTPConnection(host) 13 req.request("PUT", path, text) # {"Content-Length" : len(text)} 14 resp = req.getresponse() 15 print resp.read() 16 17 # vim: tabstop=4 expandtab shiftwidth=4