fix default input dir for app command
This commit is contained in:
parent
b91d123334
commit
5302b7dc78
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from os import path
|
||||||
here = path.abspath(path.dirname(__file__))
|
here = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='Ciclostile',
|
name='ciclostile',
|
||||||
version='0.0.0.dev0',
|
version='0.0.0.dev0',
|
||||||
|
|
||||||
description='Static site generator',
|
description='Static site generator',
|
||||||
|
|
10
src/cli.py
10
src/cli.py
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import click
|
import click
|
||||||
import ciclostile
|
import ciclostile
|
||||||
|
@ -34,9 +35,12 @@ def index(template, output, folder):
|
||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option("-p", "--port", type=int, default=12345)
|
@click.option("-p", "--port", type=int, default=12345)
|
||||||
@click.argument("post_dir", default=".")
|
@click.argument("input_dir", default=os.getcwd(), type=click.Path(exists=True,
|
||||||
def app(port, post_dir):
|
file_okay=False))
|
||||||
webapp.run(port=port)
|
def app(port, input_dir):
|
||||||
|
print({'port': port,
|
||||||
|
'input': input_dir})
|
||||||
|
# webapp.run(port=port)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user