Skip to content

πŸ“„ Convert a GitHub repository into a single PDF file for LLM Feeding

License

Notifications You must be signed in to change notification settings

kaifirschau/repo-to-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub to PDF Converter πŸ“„

This script helps you convert the content of a GitHub repository into a single PDF file. It is useful for feeding codebases to language models, printing code for review, or simply for archival purposes.

Features

  • Download a GitHub repository and convert it into a single PDF file
  • Skip specified directories (e.g., node_modules)

Prerequisites

The script requires pdftk, enscript, and ps2pdf to be installed on your system. The script will attempt to install the required packages automatically for macOS users using Homebrew. If you're on another platform, please install them manually before running the script.

Usage

  1. Clone the repository & enter it:
git clone https://github.com/kaifirschau/repo-to-pdf.git && cd repo-to-pdf
  1. Make the script executable:
chmod +x githubToPDF.sh
  1. Run the script with the repository URL and the -s flag followed by the directories you want to skip (separated by commas):
./githubToPDF.sh -r https://github.com/user/repo -s node_modules,other_directory

This command will download the specified repository and create a PDF file with the same name as the repository in your current directory.

License

This project is open source and available under the MIT License.

About

πŸ“„ Convert a GitHub repository into a single PDF file for LLM Feeding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages