comparison python/s5ify.py @ 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
children 1758ead4ad2f
comparison
equal deleted inserted replaced
760:d0b975ffabdf 761:9e4a21ca48af
1 #!/usr/bin/env python
2
3 """
4 my front end to rst2st.py
5 """
6
7 # imports
8 import argparse
9 import os
10 import subprocess
11 import sys
12
13 def normalize_filename(filename):
14 return None # TODO
15
16 def main(args=sys.argv[1:]):
17 """CLI"""
18
19 # parse command line
20 parser = argparse.ArgumentParser(description=__doc__)
21 parser.add_option('input')
22 options = parser.parse_parse(args)
23
24 # sanity
25 input = options.input
26 if not os.path.isfile(input)
27 parser.error("Not a file: '{}'".format(input))
28 input = os.path.abspath(options.input)
29
30 if __name__ == '__main__':
31 main()