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 filesDockerfile,.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:
- Project structure (
tree -L 2output) - Code snippets from
main.py,utils.py, etc. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file project2pdf-0.2.3.tar.gz.
File metadata
- Download URL: project2pdf-0.2.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e1b7e05a0f3d12bc25a07ffc25881622c6cb32fcb657ff90489ae115f12a0f7
|
|
| MD5 |
630a76f23325058e50f59ad906cdc91a
|
|
| BLAKE2b-256 |
e238cdac94e3cf1c3117c6d3a1f5d1469651b3252e947739b8b382d6cfb5c6f1
|
File details
Details for the file project2pdf-0.2.3-py3-none-any.whl.
File metadata
- Download URL: project2pdf-0.2.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a223b2d8ab4ed5c03e5d39b9a5059d4946bcd0cd4783b4754773fe91f7b81d9e
|
|
| MD5 |
f31ea222e97f4e716a5e8cf7cb69f1c7
|
|
| BLAKE2b-256 |
c37150feda812aa16dff394794b4476a4975c375979fa2844b2ca0135799bb1f
|