commands.py 文件源码

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

项目:markdownreveal 作者: markdownreveal 项目源码 文件源码
def show(markdown_file: Path, host: str='localhost', port: int=8123):
    """
    Visualize your presentation (default).
    """
    markdown_file = Path(markdown_file)

    observer = Observer()
    handler = Handler(markdown_file)
    # Initial generation
    generate(markdown_file)
    observer.schedule(handler, '.', recursive=True)
    observer.start()

    server = Server()
    config = load_config()
    server.watch(str(config['output_path'] / '.reload'), delay=0)
    server.serve(
        root=str(config['output_path']),
        restart_delay=0,
        debug=True,
        open_url=True,
        open_url_delay=0,
        host=host,
        port=port,
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号