# HG changeset patch # User Jeff Hammel # Date 1452102297 28800 # Node ID e047129c84bc850ab143e38d5ce168aaaa8097cb # Parent 1758ead4ad2f6fda82240917665c02e3d9b498f4 ch ch ch changes diff -r 1758ead4ad2f -r e047129c84bc python/s5ify.py --- a/python/s5ify.py Mon Jan 04 12:56:15 2016 -0800 +++ b/python/s5ify.py Wed Jan 06 09:44:57 2016 -0800 @@ -27,5 +27,19 @@ parser.error("Not a file: '{}'".format(input)) input = os.path.abspath(options.input) + # get output name from input + output_filename = os.path.splitext(os.path.basename(input))[0] + '.html' + output = os.path.join(os.path.dirname(input), output_filename) + + # build command line + options = [] + command = ['rst2s5.py'] + command.extend(options) + command.extend([input, output]) + print subprocess.list2cmdline(command) + + # call it + subprocess.call(command) + if __name__ == '__main__': main()