Hermes
Add hierarchical bookmarks/outline (章->节->小节) to PDF files. Auto-detects text-based vs scanned PDFs, uses OCR for scanned ones. Supports both Chinese and English heading patterns. Use when user asks to add bookmarks, outline, table of contents, or navigation structure to a PDF. Triggers on "add bookmarks", "add outline", "为PDF添加书签", "PDF大纲", "PDF目录", "PDF navigation", or providing a PDF path and asking for bookmarks.From its SKILL.md
npx -y skills add StarryCode-Lang/pdf-add-bookmarks --skill hermesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, 331 tokens by cl100k_base, as published. Nobody here has run it
PDF Add Bookmarks
Run the script on the user's PDF. It auto-detects everything and outputs a new file with bookmarks.
Quick Start
pip install pymupdf pytesseract pillow
python scripts/add_bookmarks.py "file.pdf"
Output: file_with_bookmarks.pdf
Modes
Auto-detect (default): Script detects if PDF is text-based or scanned. Supports heading patterns:
第X章/X 标题/X.X 标题/X.X.X 标题(Chinese)X. Title/Chapter X/Part X(English)A.1. Subsection(Appendix)
TOC file mode: Import bookmarks from a text table of contents:
python scripts/add_bookmarks.py "file.pdf" --toc toc.txt [--offset N]
TOC format — one entry per line, indentation for hierarchy:
第1章 概述 1
1.1 背景 2
1.1.1 研究现状 3
1.2 目标 10
Force OCR: --force-ocr flag for PDFs with watermarks confusing text detection.
Dependencies
See references/dependencies.md for cross-platform tesseract + Chinese language data setup.
Required: pymupdf pytesseract pillow + tesseract-ocr system tool.
What ships with it: 2 files
2.7 KB alongside SKILL.md
- config.yaml1.1 KB
- README.md1.5 KB