Convert Markdown files to PDF from your command line.
Project description
markdown-convert
Convert Markdown files to PDF from your command line.
pip install markdown-convert
markdown-convert
is an elegant command-line tool that converts Markdown files to PDF, powered by the amazing markdown2
and weasyprint
libraries.
Unlike other similar tools, it relies solely on Python packages to do the job, eliminating the need for any external system-level dependencies when running on Linux.
If you're running Windows, you only need to install the GTK-3 runtime from the following link: GTK-3 Runtime.
Features
- ⚡️ Supports live compilation, so you can preview your PDF in real-time as you type.
- 🌸 Comes with beautiful CSS out of the box, making your documents look great from the start.
- 🎨 Syntax highlighting for code blocks included.
- 🪐 Designed for the 21st century, with relative links, pipe tables, and modern CSS paged media features.
Usage
Note: If you just installed the package, you may need to log out and log back in for the
markdown-convert
command to be registered to your PATH.
Run markdown-convert -h
right from your terminal to check out the available options:
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.
...or import any of the functions from the package to use them in your own code:
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')
Integrations
Right click a Markdown file and Convert to PDF
with the markdown_convert_explorer and markdown_convert_nautilus extensions for Windows and Linux.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file markdown_convert-1.2.4.tar.gz
.
File metadata
- Download URL: markdown_convert-1.2.4.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e45de7c09b5d98a6ac654f36b3cc29aef0dfc6e4338b854c7fab89daef84ef |
|
MD5 | 33e8ae2f96cb62d8387aac1b1390eaf9 |
|
BLAKE2b-256 | e348e26d673288009be65f17201644198e8067a8698a417862e738f819198b8b |
File details
Details for the file markdown_convert-1.2.4-py3-none-any.whl
.
File metadata
- Download URL: markdown_convert-1.2.4-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bc4b1e8d812210a65c715b2c5ad54e4311efed5a76e21185c00b93d5b35b755 |
|
MD5 | d0711ffa092ed8ccff20fe11e4919077 |
|
BLAKE2b-256 | 5c62952d4f0974c1e912477fc52455b24a74b05c25110c76d51d181593a33bc5 |