markdown_convert
1.0.0
将标记文件从您的命令行转换为PDF。
pip install markdown-convert markdown-convert是一种优雅的命令行工具,可将Markdown文件转换为PDF,由惊人的markdown2和weasyprint库提供支持。
与其他类似工具不同,它仅依靠Python软件包来完成这项工作,从而消除了在Linux上运行时对任何外部系统级依赖的需求。
如果您正在运行Windows,则只需要从以下链接安装GTK-3运行时:GTK-3运行时。
注意:如果您刚刚安装了软件包,则可能需要注销并登录以将
markdown-convert命令注册到您的路径上。
从您的终端运行markdown-convert -h以查看可用选项:
Usage:
markdown-convert [markdown_file_path] [options]
Options:
--mode=once | live
Convert the markdown file once (default) or live.
--css=[css_file_path]
Use a custom CSS file.
--out=[output_file_path]
Specify the output file path....或从包装中导入任何功能以在您自己的代码中使用它们:
from markdown_convert import convert , live_convert
# Convert your Markdown file to PDF once
convert ( 'README.md' , 'style.css' , 'README.pdf' )
# Convert your Markdown file to PDF every time it changes
live_convert ( 'README.md' , 'style.css' , 'README.pdf' )右键单击Markdown文件,然后使用Markdown_Convert_explorer和Windows和Linux的Markdown_convert_nautilus扩展名Convert to PDF 。