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

Uploaded Python 3

File details

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

File metadata

  • Download URL: project2pdf-0.3.0.tar.gz
  • Upload date:
  • Size: 5.3 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.0.tar.gz
Algorithm Hash digest
SHA256 fabf11a83ecfd013a14002ac66803babf072edae43bc143f1ce620a660fdef47
MD5 aa758effe050fb6979ecfa2f86a8ec82
BLAKE2b-256 bfbf1c7ef97b23fbd585aff4f4ff463aa0af4f001ba4af29e17a5e4b9b9b6892

See more details on using hashes here.

File details

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

File metadata

  • Download URL: project2pdf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61388710ba2be5dfcae57478471735f35eccc06af4e514c34fe2b8d3688b32ae
MD5 83ba094d0ee714233f7dd6f3733b5d0f
BLAKE2b-256 e1488bb777d17fd7cec77ba4693ff29be0690eb524a195f26634160748a2467d

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