Convert markdown file to pdf file using Chromium.
./mdtopdf.py README.md
usage: mdtopdf.py [-h] [-v] [-o OUTPUT_FILE] [-c COLORSCHEME] [--list-colorschemes] [INPUT_FILE]
Convert markdown file to pdf.
positional arguments:
INPUT_FILE the input file to be converted
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-o OUTPUT_FILE, --output OUTPUT_FILE the output file where the result will be saved
-c COLORSCHEME, --colorscheme COLORSCHEME the colorscheme used to color code blocks (default: github-dark)
--list-colorschemes list all the available colorschemes and exit
Copy mdtopdf.py where you want to install it (in ~/.local/bin
fro example).
install -Dm755 mdtopdf.py ~/.local/bin/mdtopdf
You need to have Chromium or Brave install on your system.
Install markdown:
pip install markdown
Install Pygments:
pip install Pygments
Or
pip install -r requirements.txt
Create the arch-package and install it.
makepkg -csfi
pip install -r requirements-dev.txt
Run the tests:
./test.sh
The css use for rendering the pdf.