Skip to main content

Generate a project structures and files in a single pdf file.

Project description

๐Ÿ“„ project2pdf

Convert project structures into a single PDF. Perfect for providing context to an LLM (Large Language Model) about a specific project.

๐Ÿš€ Features

โœ… Automatically detects projects in the root directory
โœ… Generates a structured PDF with directory trees and code snippets
โœ… Supports multiple file types (.py, .ipynb, .tsx, .js, Dockerfile, .env, .md, .gitignore)
โœ… No manual input needed โ€“ just run and get your documentation

๐Ÿ“ฆ Installation

Install project2pdf from PyPI:

pip install project2pdf

๐Ÿ›  Usage

Simply run the command inside your project directory:

project2pdf

This will:

  • Detect all project folders in the root directory
  • Generate a structured PDF for each project
  • Save the output in the root as project_name_documentation.pdf

๐Ÿ“ Example Output

After running project2pdf, you will find a PDF file like:

๐Ÿ“‚ my_project_documentation.pdf

๐Ÿ”ง Configuration

No additional configuration is needed. The script will:

  • Include the first two levels of the directory structure
  • Extract relevant code from supported files
  • Format everything in a clean, readable PDF

๐Ÿ‘จโ€๐Ÿ’ป Supported File Types

The tool processes and includes the following file types:

  • .py, .ipynb โ†’ Python scripts & Jupyter Notebooks
  • .tsx, .js โ†’ TypeScript/JavaScript files
  • Dockerfile, .env, .gitignore โ†’ Project metadata
  • .md โ†’ Markdown documentation

๐Ÿ“Œ Use Cases

๐Ÿ”น Quickly onboard new developers to a project
๐Ÿ”น Document your project before sharing it with an LLM
๐Ÿ”น Organize and archive project structures

๐Ÿ’ก Example

If your project structure is:

my_project/
โ”‚โ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ utils.py
โ”‚โ”€โ”€ README.md
โ”‚โ”€โ”€ requirements.txt
โ”‚โ”€โ”€ .gitignore

project2pdf will generate my_project_documentation.pdf with:

  1. Project structure (tree -L 2 output)
  2. Code snippets from main.py, utils.py, etc.
  3. Metadata from .gitignore, requirements.txt, etc.

๐Ÿ”ฅ Why Use This?

  • Automates project documentation ๐Ÿ“‘
  • Saves time onboarding new team members โณ
  • Enhances LLMs' understanding of project context ๐Ÿค–

๐ŸŒ License

MIT License. Free to use and modify!

๐Ÿ“ฌ Feedback & Contributions

Have ideas or found a bug? Open an issue or contribute on GitHub!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

project2pdf-0.2.6.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

project2pdf-0.2.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file project2pdf-0.2.6.tar.gz.

File metadata

  • Download URL: project2pdf-0.2.6.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for project2pdf-0.2.6.tar.gz
Algorithm Hash digest
SHA256 45765d8fa1055d777d11cf2bc9d44d1d3b888d25f99ea240e3706509cecf7e30
MD5 434d5e704be4bbcc35ab3bc5ba1ba5c9
BLAKE2b-256 130d49f34b2a6e46267eff7c5b6a81bb87208a043d6713a8db0539ef2cb15e61

See more details on using hashes here.

File details

Details for the file project2pdf-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: project2pdf-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for project2pdf-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 93c0a4dc4edee435460bcc8ece31dc0ddfffae9dd976ffa13b11a0d42864432f
MD5 926156810e27627a047223de5bceb192
BLAKE2b-256 cfec535fbcaf539fcfafd197a34a424c29815cdafdcaa3824c1ec39d4e40b60d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page