cli.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:hugo_jupyter 作者: knowsuchagency 项目源码 文件源码
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'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号