Name | codebase_context JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-03-29 15:47:26 |
maintainer | None |
docs_url | None |
author | Julian Kimmig |
requires_python | <4.0,>=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
1. **Clone the repository:**
```
git clone https://yourrepository/codebase_context.git
cd codebase_context
```
2. **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 to `codebase.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:
1. **Fork the repository**: Click the "Fork" button on the GitHub page to create your own copy of the project.
2. **Create a new branch**: Make a branch for your changes with a descriptive name.
3. **Make your changes**: Add new features or fix bugs.
4. **Write tests**: If possible, add unit tests for your changes to ensure reliability.
5. **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!
```
```
Raw data
{
"_id": null,
"home_page": null,
"name": "codebase_context",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Julian Kimmig",
"author_email": "julian.kimmig@gmx.net",
"download_url": "https://files.pythonhosted.org/packages/0b/38/97689b151870b40c67c1fa7c1e4c9fba55fb64fc4c24607196d81d4d4085/codebase_context-0.1.2.tar.gz",
"platform": null,
"description": "# Codebase Context Generator\n\nThe 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.\n\n## Features\n\n- **Folder Tree Generation**: Creates a hierarchical representation of the directory structure of a Python module or package.\n- **Codebase Summarization**: Collects and summarizes the content of Python files within the specified module or package.\n- **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.\n\n## Installation\n\nThis 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.\n\n### Installation via pip\n\n```\npip install codebase_context\n```\n\n### Installation from source\n\n1. **Clone the repository:**\n\n```\n\ngit clone https://yourrepository/codebase_context.git\ncd codebase_context\n\n```\n\n2. **Ensure Python 3.6+ is installed:**\n\n```\n\npython3 --version\n\n```\n\n## Usage\n\nTo use the Codebase Context Generator, you can run the script from the command line, specifying the target module and the output file.\n\n### Basic Command\n\n```\n\npython3 -m codebase_context <module> [--outfile <output_file.txt>]\n\n```\n\n- `<module>`: The name of the Python module or package you wish to summarize.\n- `<output_file.txt>`: Optional. The name of the file to write the summary to. Defaults to `codebase.txt` if not specified.\n\n### Examples\n\n- **Generate a summary for a module called `example_module`:**\n\n```\n\npython3 -m codebase_context example_module\n\n```\n\nThis command will create a `codebase.txt` file in the current directory containing the summary of `example_module`.\n\n- **Generate a summary with a custom output file name:**\n\n```\n\npython3 -m codebase_context example_module --outfile summary.txt\n\n```\n\nThis will generate a file named `summary.txt` with the codebase summary.\n\n## Contributing\n\nContributions to the Codebase Context Generator are welcome! Here's how you can contribute:\n\n1. **Fork the repository**: Click the \"Fork\" button on the GitHub page to create your own copy of the project.\n\n2. **Create a new branch**: Make a branch for your changes with a descriptive name.\n\n3. **Make your changes**: Add new features or fix bugs.\n\n4. **Write tests**: If possible, add unit tests for your changes to ensure reliability.\n\n5. **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.\n\nThank you for considering contributing to the Codebase Context Generator. Your efforts help make this tool more robust and useful for everyone!\n\n```\n\n```\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6dc36d8554f4463c4c65da7738bb61d75d5e6c5821ccfbe2a3b17c5550d403e7",
"md5": "91d5646c90a17fde85d598bc99f7bca5",
"sha256": "c6eaa863121f85821e72f8aff0777443741c20e27241d87a4db5c4f05a4e6e5f"
},
"downloads": -1,
"filename": "codebase_context-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "91d5646c90a17fde85d598bc99f7bca5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 4517,
"upload_time": "2024-03-29T15:47:24",
"upload_time_iso_8601": "2024-03-29T15:47:24.756781Z",
"url": "https://files.pythonhosted.org/packages/6d/c3/6d8554f4463c4c65da7738bb61d75d5e6c5821ccfbe2a3b17c5550d403e7/codebase_context-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0b3897689b151870b40c67c1fa7c1e4c9fba55fb64fc4c24607196d81d4d4085",
"md5": "77cae8c4f2df62a2e5aa6a2f1d54af76",
"sha256": "b22ab159b4795f3917d8a52f651e5593b1d6d57cfa57ce9163a9a4e6a539dd5d"
},
"downloads": -1,
"filename": "codebase_context-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "77cae8c4f2df62a2e5aa6a2f1d54af76",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 3499,
"upload_time": "2024-03-29T15:47:26",
"upload_time_iso_8601": "2024-03-29T15:47:26.396950Z",
"url": "https://files.pythonhosted.org/packages/0b/38/97689b151870b40c67c1fa7c1e4c9fba55fb64fc4c24607196d81d4d4085/codebase_context-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-29 15:47:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "codebase_context"
}