No project description provided
Project description
Codebase Context Generator
The Codebase Context Generator is a tool designed to create a detailed summary of a Python codebase, including a folder tree and the contents of Python files. This summary can serve as input for large language models or for documentation purposes. By generating a structured representation of a codebase, this tool aids in understanding and analyzing the structure and contents of Python projects.
Features
- Folder Tree Generation: Creates a hierarchical representation of the directory structure of a Python module or package.
- Codebase Summarization: Collects and summarizes the content of Python files within the specified module or package.
- Flexible Output: Generates a text file that contains both the folder tree and the raw content of Python files, making it easy to process further.
Installation
This project does not require installation of external packages beyond the standard Python library. However, it assumes you have Python 3.6 or later installed on your system.
Installation via pip
pip install codebase_context
Installation from source
- Clone the repository:
git clone https://yourrepository/codebase_context.git
cd codebase_context
- Ensure Python 3.6+ is installed:
python3 --version
Usage
To use the Codebase Context Generator, you can run the script from the command line, specifying the target module and the output file.
Basic Command
python3 -m codebase_context <module> [--outfile <output_file.txt>]
<module>
: The name of the Python module or package you wish to summarize.<output_file.txt>
: Optional. The name of the file to write the summary to. Defaults tocodebase.txt
if not specified.
Examples
- Generate a summary for a module called
example_module
:
python3 -m codebase_context example_module
This command will create a codebase.txt
file in the current directory containing the summary of example_module
.
- Generate a summary with a custom output file name:
python3 -m codebase_context example_module --outfile summary.txt
This will generate a file named summary.txt
with the codebase summary.
Contributing
Contributions to the Codebase Context Generator are welcome! Here's how you can contribute:
-
Fork the repository: Click the "Fork" button on the GitHub page to create your own copy of the project.
-
Create a new branch: Make a branch for your changes with a descriptive name.
-
Make your changes: Add new features or fix bugs.
-
Write tests: If possible, add unit tests for your changes to ensure reliability.
-
Submit a pull request: Open a pull request from your forked repository to the main project. Describe your changes and why they should be included.
Thank you for considering contributing to the Codebase Context Generator. Your efforts help make this tool more robust and useful for everyone!
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
File details
Details for the file codebase_context-0.1.2.tar.gz
.
File metadata
- Download URL: codebase_context-0.1.2.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b22ab159b4795f3917d8a52f651e5593b1d6d57cfa57ce9163a9a4e6a539dd5d |
|
MD5 | 77cae8c4f2df62a2e5aa6a2f1d54af76 |
|
BLAKE2b-256 | 0b3897689b151870b40c67c1fa7c1e4c9fba55fb64fc4c24607196d81d4d4085 |
File details
Details for the file codebase_context-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: codebase_context-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6eaa863121f85821e72f8aff0777443741c20e27241d87a4db5c4f05a4e6e5f |
|
MD5 | 91d5646c90a17fde85d598bc99f7bca5 |
|
BLAKE2b-256 | 6dc36d8554f4463c4c65da7738bb61d75d5e6c5821ccfbe2a3b17c5550d403e7 |