← ClaudeAtlas

brewdocmd-to-pdflisted

Convert Markdown to PDF via reportlab or weasyprint engines. Triggers - pdf, md to pdf, markdown to pdf, generate pdf.
kochetkov-ma/claude-brewcode · ★ 27 · Data & Documents · score 77
Install: claude install-skill kochetkov-ma/claude-brewcode
# MD to PDF Converts Markdown files to professional PDF using one of two rendering engines. ## Step 0: Parse Arguments Parse `$ARGUMENTS` to determine mode and components. | Component | Required | Description | |-----------|:--------:|-------------| | `md_file` | per mode | Path to `.md` file | | `--engine` | No | `reportlab` or `weasyprint` (overrides saved config) | | `custom_prompt` | No | Last argument in double quotes = LLM preprocessing instructions | **Mode detection rules:** | Condition | Mode | |-----------|------| | Empty or `help` | HELP | | `styles` or `config` | STYLES | | `test` | TEST | | Path to `.md` file + quoted string at end | CONVERT+PROMPT | | Path to `.md` file (no quoted string) | CONVERT | Extract `--engine <name>` from anywhere in arguments if present. Remove it before further parsing. ## Step 1: Dependency Check Determine the target engine (from `--engine` flag, saved config, or default `reportlab`). **EXECUTE** using Bash tool: ```bash bash "${CLAUDE_SKILL_DIR}/scripts/check_deps.sh" check ENGINE_NAME 2>&1; echo "EXIT_CODE=$?" ``` Replace `ENGINE_NAME` with the target engine. **If output contains `MISSING_PIP` or `MISSING_SYSTEM`:** Use `AskUserQuestion` presenting the engine comparison table: | Feature | reportlab | weasyprint | |---------|-----------|------------| | Install | pip only | pip + brew | | Quality | Good | Excellent | | Speed | Fast | Moderate | | Images | Basic | Full | | CSS Styling | No | Yes | | Code highlight | No |