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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for project2pdf-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7613bbc3036801d7d48e4686bc404bb200cd0e7f8f2ebe93f094e5a2dcf115f1
MD5 ea413dab3faf81c1359a104a286f0b3c
BLAKE2b-256 1c6b991426fee765e76473ee8bbf472fd427585d454bbdd4f9061359e3961a67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: project2pdf-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1549d16a8ab81a1e26df5fe8552c3d1cb31460d8de9345a73befe8457e0e6eb7
MD5 8df11590b56933bb2ad500a39afd46ec
BLAKE2b-256 94cafccd053e05e4f46c9b9ac4ed6026b5e8c62ca4359f360aec48d93558aa4f

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