9 Commits

Author SHA1 Message Date
Your Name
7de2bc811a Add output directory structure and heading-based image naming
- Output files now go to output/<document-name>/ relative to input
- Images named after nearest heading (e.g., file_flow.svg)
- Multiple images under same heading get suffixes: _1, _2, etc.
- Images before any heading use document name as prefix
- Add StateT-based AST traversal for heading tracking
- Add HSpec test suite with 21 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 17:47:49 +00:00
Your Name
7d2b407908 Fix puppeteer config to be portable across directories
- Embed puppeteer configuration in Mermaid module
- Create temporary config files instead of relying on external file
- Remove standalone puppeteer-config.json file
- Ensures docster works from any directory without config dependencies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-02 16:09:40 +00:00
Your Name
4ae2321cfd Complete installation setup and fix browser sandbox issue
- Add complete installation instructions including ghcup setup
- Create install-deps.sh script for system dependencies
- Fix GHC version compatibility (base >=4.18 instead of 4.21)
- Add puppeteer config to disable sandboxing for mermaid CLI
- Update Mermaid module to use puppeteer config file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-02 15:52:15 +00:00
dbefe27f9f Refactor to pipeline
introduce CompilationM monad
2025-07-30 12:38:14 +02:00
a7db2a53df Change order of arguments to prepare for pipeline 2025-07-30 09:31:06 +02:00
907fcb3884 Refactor compileWithStrategy to use ExceptT for linear error handling
Replace deeply nested Either case expressions with clean ExceptT monad
transformer pipeline. This eliminates manual error propagation and
creates a more readable "straight line" flow while preserving identical
error handling semantics.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 23:31:40 +02:00
bf6f82abe5 Replace makePDF with direct XeLaTeX processing to eliminate API mismatch
- Remove Text.Pandoc.PDF dependency and dummy Pandoc document
- Add direct xelatex invocation with temporary file handling
- Improve error reporting with LaTeX log file parsing
- Add temporary package dependency for proper temp file cleanup
- Maintain same external API while cleaning internal architecture
- Eliminate architectural mismatch between our pipeline and Pandoc's expectations

The previous code used makePDF in a way that fought against its intended usage,
requiring a dummy Pandoc document. Now we directly call xelatex after our
custom LaTeX template processing, creating a cleaner separation of concerns.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 23:22:40 +02:00
303f347243 Refactor Compiler.hs with higher-order functions to eliminate duplication
- Extract PDF and HTML compilation differences using strategy pattern
- Implement CompilationStrategy record with format-specific operations
- Create higher-order compileWithStrategy function for common pipeline
- Eliminate ~40 lines of duplicated code between PDF/HTML compilation
- Add LambdaCase extension for cleaner monadic error handling
- Maintain same external API while improving internal architecture
- Enable easy addition of new output formats through new strategies

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 23:12:13 +02:00
1c8cfdb075 Split Main.hs into logical modules for better maintainability
- Extract types into Docster.Types module (50 lines)
- Move Mermaid processing to Docster.Mermaid module (93 lines)
- Create Docster.Transform for document walking (21 lines)
- Isolate LaTeX templates in Docster.LaTeX module (65 lines)
- Extract compilation logic to Docster.Compiler module (90 lines)
- Reduce Main.hs to minimal CLI entry point (23 lines from 233)
- Add library stanza to cabal file with proper module organization
- Follow Haskell conventions with Docster.ModuleName hierarchy

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 22:31:55 +02:00