docster/README.md
Your Name dda2fc15b2 Update docs and install script for Stack/GHC 9.10.3
Switch README and CLAUDE.md from cabal to stack commands, update GHC
version references, add pkg-config to install-deps.sh, and add Stack
as the recommended build method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:27:36 +00:00

82 lines
1.6 KiB
Markdown

# 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
Mermaid code blocks (```mermaid) will be rendered to SVG and embedded.
## Installation
### Prerequisites
Install the required system dependencies (Ubuntu/Debian):
```bash
./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):
```bash
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
source ~/.ghcup/env
```
#### Option A: Build with Stack (recommended)
Stack manages its own GHC installation automatically.
```bash
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
```bash
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
```bash
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:
```bash
# For Stack
export PATH="$HOME/.local/bin:$PATH"
# For Cabal
export PATH="$HOME/.local/bin:$PATH"
```
## Development
```bash
stack build # compile
stack test # run tests
stack repl # interactive REPL
```
See [agents.md](agents.md) for information about the Claude Code agents used for Haskell refactoring in this project.