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.0.tar.gz (4.5 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.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: project2pdf-0.2.0.tar.gz
  • Upload date:
  • Size: 4.5 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.0.tar.gz
Algorithm Hash digest
SHA256 bf60c06e324436275db955cf3de34bf1ea49f3658c7161d1fe4df876032aee37
MD5 cad46db261f8a6dc82437ba8def32a3f
BLAKE2b-256 19581cff3e960af7af19c1885d3a23111c954bf31b1cbdb6f32d905db6f86ef7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: project2pdf-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e28e712092a7855d5afd25569ac24d0ed43ce5af3d7d2ff22e0ae570a6806d8
MD5 45a822b76517ef9fa31be72a89124c41
BLAKE2b-256 f5a81d6e2a1d8742af09be4d3260c88155df5b7d60e89c9cf86bf8b04eb4bd50

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