Added argument parsing to d
d takes two optional arguments to pass in the source and target directories. The bin/dc
executable has been removed.
author |
Mattijs Hoitink <mattijs@monkeyandmachine.com> |
date |
Tue, 14 Feb 2012 19:17:30 +0100 |
parents |
ee62f412c6ef |
children |
fc54225e8b51 |
#!/usr/bin/env python
import sys, os, argparse
# Ugly hack so I can code in peace.
try:
from d.base import render_files
except ImportError:
sys.path.append(os.path.abspath(os.path.join(__file__, '..', '..')))
from d.base import render_files
if __name__ == '__main__':
# Argument parser
parser = argparse.ArgumentParser(description='Markdown files to documentation. Run and get on with your life.')
parser.add_argument('-s', dest='source', default='.', help='Documentation source', metavar='SOURCE')
parser.add_argument('-t', dest='target', default='./build', help='Documentation output target', metavar='TARGET')
args = parser.parse_args()
# Render with arguments
render_files(args.source, args.target)