How bankkroll/repo2pdf works
repo2pdf is a Node.js CLI that turns a GitHub or local repository into one PDF or a PDF per file. The user selects the source, output mode, and optional formatting features; the CLI acquires the repository, applies ignore rules, processes text files, and writes PDFs. The README also advertises the web app, but no web-app implementation appears in this tree. The sampled entry point shows the main workflow; feature stages share its implementation file rather than separate modules.
Main entry points: clone.ts CLI workflow · configHandler.ts Source and options · loadIgnoreConfig.ts Ignore configuration · universalExcludes.ts Default exclusions
Components 12
CLI interaction
- CLI workflow
src/clone.ts - Source and options
src/configHandler.ts
Repository processing
- GitHub or local repo
- Repository clone
src/clone.ts - Ignore configuration
src/loadIgnoreConfig.ts - File traversal
src/clone.ts - Default exclusions
src/universalExcludes.ts
PDF generation
- Text preparation
src/clone.ts - Syntax conversion
src/syntax.ts - PDF rendering
src/clone.ts - PDF file(s)
Other components
- CLI user
Connections 14
- CLI user → CLI workflow: starts
README.md - CLI workflow → Source and options: prompts
src/clone.ts - Source and options → CLI workflow: configures
src/configHandler.ts - Source and options → GitHub or local repo: selects
src/configHandler.ts - CLI workflow → Repository clone: clones when remote
src/clone.ts - GitHub or local repo → Repository clone: provides URL
README.md - CLI workflow → Ignore configuration: loads rules
src/clone.ts - CLI workflow → File traversal: traverses
src/clone.ts - File traversal → Default exclusions: checks defaults
src/clone.ts - File traversal → Ignore configuration: applies configured rules
src/clone.ts - File traversal → Text preparation: reads text files
src/clone.ts - Text preparation → Syntax conversion: converts highlighting
src/clone.ts - Text preparation → PDF rendering: supplies formatted content
src/clone.ts - PDF rendering → PDF file(s): writes PDF(s)
src/clone.ts