forked from Intevation/ringo_printtemplates
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathringo-odfconverter
More file actions
23 lines (17 loc) · 921 Bytes
/
Copy pathringo-odfconverter
File metadata and controls
23 lines (17 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
"""A simple service which will convert a submitted ODT file into another Office document."""
import os
import sys
import argparse
from ringo_printtemplate.server import run
def main(arguments):
parser = argparse.ArgumentParser(description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--host', help="Hostname", default="127.0.0.1")
parser.add_argument('--port', help="Severport", type=int, default="5000")
parser.add_argument('--ooport', help="Port on which the local office client will listen.", type=int, default="2002")
parser.add_argument('--python', help="Python which is used to talk to the office client. ", default="/usr/bin/python")
args = parser.parse_args(arguments)
run(args.host, args.port, args.python, args.ooport)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))