1.1 --- a/imip_agent.py Sun Sep 21 23:37:24 2014 +0200
1.2 +++ b/imip_agent.py Sun Sep 21 23:50:20 2014 +0200
1.3 @@ -34,8 +34,13 @@
1.4 "text/x-vcalendar", "application/ics", # other possibilities
1.5 ]
1.6
1.7 -def process(f):
1.8 +def process(f, args):
1.9 msg = message_from_file(f)
1.10 + print >>open("/tmp/imip.txt", "a"), "----"
1.11 + print >>open("/tmp/imip.txt", "a"), args
1.12 + print >>open("/tmp/imip.txt", "a"), "----"
1.13 + print >>open("/tmp/imip.txt", "a"), msg.as_string()
1.14 + print >>open("/tmp/imip.txt", "a")
1.15
1.16 # Handle messages with iTIP parts.
1.17
1.18 @@ -97,6 +102,6 @@
1.19 print >>open("/tmp/imip.txt", "a"), journal
1.20
1.21 if __name__ == "__main__":
1.22 - process(sys.stdin)
1.23 + process(sys.stdin, sys.argv[1:])
1.24
1.25 # vim: tabstop=4 expandtab shiftwidth=4