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.4.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.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: project2pdf-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 b5ef9434dfd47ad129d66fed410a55f0f16bce6730e97bffeed912ba572c0e0c
MD5 ebfcd81e3ef4f2d42c4d043960f8b054
BLAKE2b-256 a492978125fda81430e0f8869671d95d706c8a85f6f9d7f5b0b242d671874ce5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: project2pdf-0.2.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fd0da2f8ac492751c194b170e965970aaabcde300df120c7b9f23cecb93a830f
MD5 d495aa166f8bd5adb543c052f52bc207
BLAKE2b-256 f68b41a310763096d263a3fe7c1ec185f24dcb9fd2869762132c721368705f0d

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