summaryrefslogtreecommitdiffstats
path: root/src/g2h/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/g2h/cli.py')
-rw-r--r--src/g2h/cli.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/g2h/cli.py b/src/g2h/cli.py
index 9eb869c..d61b71b 100644
--- a/src/g2h/cli.py
+++ b/src/g2h/cli.py
@@ -8,7 +8,6 @@ def parse_args():
parser = argparse.ArgumentParser(
prog='g2h',
description='Convert a git repository into markdown files Hugo can understand.')
- # TODO: Defaults for these two values should be $PWD.
parser.add_argument('--repo', help='Path to the root of git repository', default=os.getcwd())
parser.add_argument('--out', help='Path to where the generated files should be stored', default=os.getcwd())
parser.add_argument('--name', help='Name of the project. Default: directory name of repo')
@@ -27,7 +26,9 @@ def main():
project_name = args.name if args.name is not None else os.path.basename(args.repo)
tags = sorted(git.get_tags(), key=lambda t: t.commit.committed_date, reverse=True)
- factory = PageFactory(args.out, project_name, args.content_subdir)
+ content_out = os.path.join(args.out, 'content', args.content_subdir)
+
+ factory = PageFactory(content_out, project_name, args.content_subdir)
factory.new_overview(branches, tags, head).render()
factory.new_log(commits, branches, tags, head).render()
for commit in commits: