Skip to content

xin888-srxly/claude-code-pdf-builder

Repository files navigation

Agent Docs Lab — Multi-Agent Documentation EPUB Builder

Build structured EPUB documentation from multiple AI agent projects for offline study in MarginNote4, Apple Books, or calibre.

Supported Agents

Agent Source Pages Volumes Language
Claude Code code.claude.com/docs/llms.txt → HTTP fetch 126 7 zh-CN / en fallback
Hermes Agent github.com/NousResearch/hermes-agent → git clone 314 9 en

Quick Start

# Install dependencies
pip install -r requirements.txt

# Build everything
python build_all.py

# Build a single agent
python build_all.py claude-code
python build_all.py hermes-agent

Project Structure

agent-docs-lab/
├── shared/                    # Shared build modules
│   ├── markdown_utils.py      # MD parsing, Docusaurus conversion
│   ├── link_utils.py          # Link classification (internal/external)
│   ├── epub_builder.py        # EPUB assembly engine
│   ├── report.py              # Build report generation
│   └── css/epub.css           # Shared EPUB stylesheet
├── claude-code/               # Claude Code builder
│   ├── fetch_docs.py          # Wrapper → root fetch_docs.py
│   └── build_all.py           # 7-volume EPUB builder
├── hermes-agent/              # Hermes Agent builder
│   ├── config.py              # Volumes, slugs, paths
│   ├── fetch_docs.py          # Git clone + Docusaurus MD conversion
│   ├── build_all.py           # 9-volume EPUB builder
│   └── make_inventory.py      # Document inventory generator
├── config.py                  # Claude Code config (URLs, slugs, volumes)
├── fetch_docs.py              # Claude Code HTTP fetch + HTML→MD
├── build_all.py               # Top-level orchestrator
├── markdown/                  # Claude Code intermediate Markdown
├── cache/                     # Claude Code HTML cache
├── output/                    # Claude Code EPUB output
├── styles/                    # Claude Code CSS
└── assets/                    # Claude Code images

Claude Code Volumes (7)

Vol Name Pages
00 全量归档 126
01 核心学习 27
02 受控工作流 25
03 自动化与集成 23
04 企业平台 13
05 Agent SDK 29
06 最新动态 9

Hermes Agent Volumes (9)

Vol Name Pages
00 Full Archive 314
01 Getting Started 8
02 Core Usage 13
03 Features 40
04 Messaging & Integrations 28
05 Guides & Tutorials 25
06 Developer Guide 24
07 Reference 11
08 Skills Catalog 165

Official Index Paths

Claude Code

URL Description
https://code.claude.com/docs/llms.txt Official doc index (100+ pages)
https://code.claude.com/docs/zh-CN/overview Chinese docs entry point

Hermes Agent

URL Description
https://github.com/NousResearch/hermes-agent Source repo with docs in website/docs/
https://hermes-agent.nousresearch.com/docs/ Live docs site

Individual Agent Builds

# Claude Code
python fetch_docs.py             # fetch from code.claude.com
cd claude-code && python build_all.py  # build 7 EPUBs → ../output/

# Hermes Agent
cd hermes-agent
python fetch_docs.py             # git clone + convert
python build_all.py              # build 9 EPUBs → dist/

Requirements

  • Python 3.11+
  • See requirements.txt for Python dependencies
  • Git (for Hermes Agent docs)

MarginNote4 Workflow

  1. Build EPUBs with this tool
  2. Import EPUBs into MarginNote4 via AirDrop or file sharing
  3. Use study sets to organize by agent
  4. Create concept maps, decision cards, SOP cards per agent

About

Claude Code CLI PDF/EPUB builder tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors