def main(argv=None):
args = docopt(__doc__, argv=argv, version='1.0.3')
assert 'config.toml' in (p.name for p in Path().iterdir()), "config.toml not found in directory. Are you sure you're in the project's root?"
if args['--init']:
notebooks_dir = Path('./notebooks/')
notebooks_dir.mkdir(exist_ok=True)
with open(resource_filename('hugo_jupyter', '__fabfile.py')) as fp:
fabfile = Path('fabfile.py')
fabfile.write_text(fp.read())
print(dedent("""
Successfully initialized. From this directory, the following commands are available.
Just remember to prepend them with `fab`
"""))
run(('fab', '-l'))
评论列表
文章目录