summaryrefslogtreecommitdiffstats
path: root/g2h/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'g2h/cli.py')
-rw-r--r--g2h/cli.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/g2h/cli.py b/g2h/cli.py
index e7c66fc..1979045 100644
--- a/g2h/cli.py
+++ b/g2h/cli.py
@@ -1,16 +1,21 @@
import argparse
+from .git import Git
+from .gen import Generator
def parse_args():
parser = argparse.ArgumentParser(
prog='g2h',
description='Convert a git repository into markdown files Hugo can understand.')
- parser.add_argument('repo-path', help='Path to the root of git repository')
- parser.add_argument('out-dir', help='Path to where the generated files should be stored')
+ parser.add_argument('repo_path', help='Path to the root of git repository')
+ parser.add_argument('out_dir', help='Path to where the generated files should be stored')
return parser.parse_args()
def main():
args = parse_args()
+ git = Git(args.repo_path)
+ gen = Generator(args.out_dir)
+ gen.render_overview(git.get_all_commits())
if __name__ == '__main__':
main()