commands.py 文件源码

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

项目:markdownreveal 作者: markdownreveal 项目源码 文件源码
def zip(markdown_file: Path):
    """
    Generate a ZIP file with the presentation.
    """
    markdown_file = Path(markdown_file)

    # We copy the directory because `make_archive` cannot follow symlinks...
    with TemporaryDirectory() as tmpdir:
        tmpdir = Path(tmpdir) / 'out'
        generate(markdown_file)
        config = load_config()
        copytree(src=str(config['output_path']), dst=str(tmpdir))
        make_archive(markdown_file.stem, format='zip', root_dir=str(tmpdir))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号