Clone GitHub repositories and compile their source code into a single, well-formatted PDF via LaTeX.
Edit the REPOS list in code2pdf.py, then run:
python code2pdf.pyThe output is written to output.pdf in the current directory.
Edit the constants near the top of code2pdf.py:
| Variable | Description |
|---|---|
REPOS |
Default list of repo URLs to include |
OUTPUT_PDF |
Output filename (default: output.pdf) |
INCLUDE_EXTENSIONS |
Set of file extensions to include; empty = include all readable files |
SKIP_DIRS |
Directory names to skip (e.g. node_modules, .git) |
MAX_FILE_BYTES |
Max file size to include (default: 2 MB) |