2026-04-30 17:27:59 +01:00
2026-04-30 17:27:37 +01:00
2026-04-30 21:42:11 +01:00

Docster

A self-contained CLI tool that converts Markdown with Mermaid diagrams into PDF or HTML using Pandoc and Mermaid CLI.

Usage

docster -pdf path/to/file.md
docster -html path/to/file.md
docster -docx path/to/file.md

Mermaid code blocks (```mermaid) will be rendered to SVG (HTML) or PNG (PDF/DOCX) and embedded.

Installation

Prerequisites

Install the required system dependencies (Ubuntu/Debian):

./install-deps.sh

This installs build-essential, libgmp-dev, libffi-dev, zlib1g-dev, pkg-config, and TeX Live packages for PDF generation.

Install Haskell toolchain

Install ghcup (Haskell toolchain installer):

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
source ~/.ghcup/env

Stack manages its own GHC installation automatically.

ghcup install stack
stack build
stack install

This uses the resolver defined in stack.yaml (currently lts-24.34 / GHC 9.10.3).

Option B: Build with Cabal

ghcup install ghc 9.10.3
ghcup install cabal 3.16.0.0
ghcup set ghc 9.10.3
ghcup set cabal 3.16.0.0
cabal install --installdir=$HOME/.local/bin

Install Mermaid CLI

npm install -g @mermaid-js/mermaid-cli

PATH setup

Make sure the install location is in your PATH. Add to your shell config if needed:

# For Stack
export PATH="$HOME/.local/bin:$PATH"

# For Cabal
export PATH="$HOME/.local/bin:$PATH"

Development

stack build    # compile
stack test     # run tests
stack repl     # interactive REPL

See agents.md for information about the Claude Code agents used for Haskell refactoring in this project.

Description
Markdown + Mermaid to PDF with Pandoc
Readme 162 KiB
Languages
Haskell 99.3%
Shell 0.7%