zudsniper / markpdf

markdown file to pdf document, with metadata.yaml or header variable population.

Home Page:https://gh.zod.tf/markpdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markpdf.py

easily convert markdown to pdf -- including variables provided in the header of the file or within a separate provided metadata.yaml file

Installation

Administrator Privileged Dependency

🔴 wkhtmltopdf is REQUIRED
Installation process varies based on OS.

  • Linux (debian based) sudo apt-get install wkhtmltopdf -y

  • MacOS brew install wkhtmltopdf

  • Windows idk use WSL
    nah probably just scoop get wkhtmltopdf

Other Requirements

  • Python3.9 or greater

  • All pip package dependencies

$ python3 -m pip install -r requirements.txt

from here, you should be able to run the script via

$ python3 markpdf.py -o <output_pdf_name> -i <input_markdown_name> [-m <metadata_yaml_file>] 

I don't see why this is actually required...

After this, install setuptools

$ python3 -m pip install setuptools

Usage

To place variables into the your pdf, use this format:

{{ variable_name }}

variables with this name and yaml metadata counterparts of the same name will be populated with their values when the script generates a pdf.


cool

About

markdown file to pdf document, with metadata.yaml or header variable population.

https://gh.zod.tf/markpdf


Languages

Language:Python 100.0%