# repindex
`repindex` is a Python tool that indexes a repository and generates structured outputs for visualization and documentation.
## Features
- **Repository Structure**: Generates a tree-like representation of the repository.
- **Dependency Graphs**:
- **Full Graph**: Includes both imports and exports with objects listed.
- **Imports Only Graph**: Only considers imports for listing objects.
- **Exports Only Graph**: Only considers exports for listing objects.
- **No Objects Graph**: Includes all relationships but does not list objects.
- **Markdown Documentation**:
- **Full Documentation**: Compiles all files and their contents into a structured Markdown document.
- **Light Documentation**: Includes only code files (`.ts`, `.tsx`, `.css`, `.py`, `.sh`, etc.) and excludes files like `.json`, `.html`, `.txt`, etc.
## Installation
Install `repindex` using `pip`:
```bash
pip install repindex
```
### Usage
```bash
repindex /path/to/repository [-o /path/to/output_dir]
```
- **repository_path**: The path to the repository you want to index.
- **-o, --output_dir**: (Optional) The directory where outputs will be saved. Defaults to the current directory.
**Example:**
```bash
repindex ./my_project -o ./output
```
#### Outputs
The outputs are saved in a `repindex/` directory inside the specified output directory:
- **tree_structure.txt**: Tree representation of the repository.
- **Dependency Graphs**:
- `dependency_graph_full.json`: Full graph with imports and exports, including objects.
- `dependency_graph_imports.json`: Only imports with objects listed.
- `dependency_graph_exports.json`: Only exports with objects listed.
- `dependency_graph_no_objects.json`: All relationships without listing objects.
- **Markdown Documentation**:
- `documentation.md`: Full documentation with all files and contents.
- `documentation_light.md`: Light documentation including only code files.
#### Running Tests
To run the unit tests:
```bash
python -m unittest discover tests
```
#### Code Style
The code adheres to PEP8 standards. You can check code style using flake8:
```bash
pip install flake8
flake8 repindex tests
```
#### Continuous Integration
Continuous Integration is set up using GitHub Actions. The workflow runs tests and linting on each push and pull request.
#### License
This project is licensed under the MIT License.
#### Author
- Name: Simon Yang
- GitHub: [yangsi7](https://github.com/yangsi7)
#### Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
#### Acknowledgments
- Thanks to Me, Myself and I, who have helped improve this project.
#### Publishing to PyPI
To publish a new version of `repindex` to PyPI:
1. **Update the Version Number**:
Update the `__version__` in your `repindex/__init__.py` or wherever the version is defined.
2. **Install Build Tools**:
```bash
pip install build twine
```
3. **Create a Distribution**:
```bash
python3 -m build
```
This command will generate source and wheel distributions in the `dist/` directory.
4. **Upload to PyPI**:
Make sure you have a valid PyPI account and have configured your `.pypirc` file if needed. Then:
```bash
twine upload dist/*
```
You will be prompted for your PyPI username and password (or token).
5. **Verify Installation**:
After a successful upload:
```bash
pip install --upgrade repindex
```
---
Raw data
{
"_id": null,
"home_page": null,
"name": "repindex",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "repository, index, documentation, dependency graph",
"author": "Simon Yang",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e2/e1/490016213687d5b6e21ff6a7d98c7e0a3d7b51d9a7c600385d915f614b59/repindex-0.2.0.tar.gz",
"platform": null,
"description": "# repindex\n\n`repindex` is a Python tool that indexes a repository and generates structured outputs for visualization and documentation.\n\n## Features\n\n- **Repository Structure**: Generates a tree-like representation of the repository.\n- **Dependency Graphs**:\n - **Full Graph**: Includes both imports and exports with objects listed.\n - **Imports Only Graph**: Only considers imports for listing objects.\n - **Exports Only Graph**: Only considers exports for listing objects.\n - **No Objects Graph**: Includes all relationships but does not list objects.\n- **Markdown Documentation**:\n - **Full Documentation**: Compiles all files and their contents into a structured Markdown document.\n - **Light Documentation**: Includes only code files (`.ts`, `.tsx`, `.css`, `.py`, `.sh`, etc.) and excludes files like `.json`, `.html`, `.txt`, etc.\n\n## Installation\n\nInstall `repindex` using `pip`:\n\n```bash\npip install repindex\n```\n\n### Usage\n\n```bash\nrepindex /path/to/repository [-o /path/to/output_dir]\n```\n\n- **repository_path**: The path to the repository you want to index.\n- **-o, --output_dir**: (Optional) The directory where outputs will be saved. Defaults to the current directory.\n\n**Example:**\n```bash\nrepindex ./my_project -o ./output\n```\n\n#### Outputs\n\nThe outputs are saved in a `repindex/` directory inside the specified output directory:\n\n- **tree_structure.txt**: Tree representation of the repository.\n- **Dependency Graphs**:\n - `dependency_graph_full.json`: Full graph with imports and exports, including objects.\n - `dependency_graph_imports.json`: Only imports with objects listed.\n - `dependency_graph_exports.json`: Only exports with objects listed.\n - `dependency_graph_no_objects.json`: All relationships without listing objects.\n- **Markdown Documentation**:\n - `documentation.md`: Full documentation with all files and contents.\n - `documentation_light.md`: Light documentation including only code files.\n\n#### Running Tests\n\nTo run the unit tests:\n```bash\npython -m unittest discover tests\n```\n\n#### Code Style\n\nThe code adheres to PEP8 standards. You can check code style using flake8:\n```bash\npip install flake8\nflake8 repindex tests\n```\n\n#### Continuous Integration\n\nContinuous Integration is set up using GitHub Actions. The workflow runs tests and linting on each push and pull request.\n\n#### License\n\nThis project is licensed under the MIT License.\n\n#### Author\n- Name: Simon Yang\n- GitHub: [yangsi7](https://github.com/yangsi7)\n\n#### Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\n#### Acknowledgments\n\n- Thanks to Me, Myself and I, who have helped improve this project.\n\n#### Publishing to PyPI\n\nTo publish a new version of `repindex` to PyPI:\n\n1. **Update the Version Number**: \n Update the `__version__` in your `repindex/__init__.py` or wherever the version is defined.\n\n2. **Install Build Tools**:\n ```bash\n pip install build twine\n ```\n\n3. **Create a Distribution**:\n ```bash\n python3 -m build\n ```\n This command will generate source and wheel distributions in the `dist/` directory.\n\n4. **Upload to PyPI**:\n Make sure you have a valid PyPI account and have configured your `.pypirc` file if needed. Then:\n ```bash\n twine upload dist/*\n ```\n \n You will be prompted for your PyPI username and password (or token).\n\n5. **Verify Installation**:\n After a successful upload:\n ```bash\n pip install --upgrade repindex\n ```\n\n---\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "A tool to index a repository and generate structured outputs for visualization and documentation.",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/yangsi7/repindex"
},
"split_keywords": [
"repository",
" index",
" documentation",
" dependency graph"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c8f347f22734d89ee94b2d450eea74c1ae24342a0400496e14d6f48d02f2ff8f",
"md5": "f2cced351d96eab49390208555cb639b",
"sha256": "207c0b99b44382f754b659ce2a899ca6373c1d80fa5198f99a780f377c69fa4f"
},
"downloads": -1,
"filename": "repindex-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f2cced351d96eab49390208555cb639b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5942,
"upload_time": "2024-12-07T19:25:26",
"upload_time_iso_8601": "2024-12-07T19:25:26.434576Z",
"url": "https://files.pythonhosted.org/packages/c8/f3/47f22734d89ee94b2d450eea74c1ae24342a0400496e14d6f48d02f2ff8f/repindex-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e2e1490016213687d5b6e21ff6a7d98c7e0a3d7b51d9a7c600385d915f614b59",
"md5": "254d318403ed42c968bad560178851f6",
"sha256": "16c10fd3d3a7fa1b9a8eac79a70f90cf1b945d6d3fd877b481823dd110e15139"
},
"downloads": -1,
"filename": "repindex-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "254d318403ed42c968bad560178851f6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6170,
"upload_time": "2024-12-07T19:25:28",
"upload_time_iso_8601": "2024-12-07T19:25:28.218527Z",
"url": "https://files.pythonhosted.org/packages/e2/e1/490016213687d5b6e21ff6a7d98c7e0a3d7b51d9a7c600385d915f614b59/repindex-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 19:25:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yangsi7",
"github_project": "repindex",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "repindex"
}