Skip to content

Markdown tools


Tools to convert markdownfiles to html or pdf

See project at:



choco install pandoc
choco install wkhtmltopdf

Convert markdown to html

# Convert md to html using pandoc tool. Use custom css file.

pandoc -s .\ --toc --toc-depth=3 --css=styles.css -o output.html

# Multiple files can be added at the same time to the output
pandoc -s `
example_data\ `
example_data\ `
--toc --toc-depth=3 --css=styles.css -o example_output.html

Convert markdown to pdf

# Setup
python -m venv pdf_writer_env
pip install markdown pdfkit

# Convert
python .\

# Guidelines
- Code blocks
  - For source code, use 3x ` + python/bash or other syntax highlighter. Otherwise
    the code blocks gets rendered weirdly

- Headlines
  - Start markdown with #h1 tag, this way table of content gets properly separates
    content per page.

- Images
  - Add empty line before any image tag (![img]...). Otherwise the layout gets
    messed up.

Generate pdf

# Some pdf generator that ChatGPT spit out. Need to experiment further so save here

# Setup
python -m venv pdf_writer_env
pip install reportlab

# Generate
python .\

Markdown writer

# Prototyping a tkinter based markdown viewer/editor of sorts. Compiles into a
# single executable program under dist/ folder. Uses customtkinter library
# for more modern look.

# Set dev env
python -m venv doc_writer_env
pip install customtkinter

# Run the project
python .\

# Build into single executable
pyinstaller --onefile --windowed
Preview ( early version )

Doc writer