changeset 761:9e4a21ca48af

add a front end to rst2s5; stub
author Jeff Hammel <k0scist@gmail.com>
date Mon, 04 Jan 2016 12:54:51 -0800
parents d0b975ffabdf
children 1758ead4ad2f
files python/s5ify.py
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/s5ify.py	Mon Jan 04 12:54:51 2016 -0800
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+"""
+my front end to rst2st.py
+"""
+
+# imports
+import argparse
+import os
+import subprocess
+import sys
+
+def normalize_filename(filename):
+    return None  # TODO
+
+def main(args=sys.argv[1:]):
+    """CLI"""
+
+    # parse command line
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_option('input')
+    options = parser.parse_parse(args)
+
+    # sanity
+    input = options.input
+    if not os.path.isfile(input)
+        parser.error("Not a file: '{}'".format(input))
+    input = os.path.abspath(options.input)
+
+if __name__ == '__main__':
+    main()