settings example in README

This commit is contained in:
Kirill Markin 2024-06-09 10:27:48 +02:00
parent ca76a73454
commit 03372e09df
2 changed files with 41 additions and 1 deletions

View file

@ -97,6 +97,46 @@ To uninstall the package, run the following command from the directory where the
pip uninstall repo-to-text pip uninstall repo-to-text
``` ```
## Settings
`repo-to-text` also supports configuration via a `.repo-to-text-settings.yaml` file. By default, the tool works without this file, but you can use it to customize what gets included in the final text file.
### Creating the Settings File
To create a settings file, add a file named `.repo-to-text-settings.yaml` at the root of your project with the following content:
```yaml
# Syntax: gitignore rules
# Ignore files and directories for all sections from gitignore file
# Default: True
gitignore-import-and-ignore: True
# Ignore files and directories for tree
# and "Contents of ..." sections
ignore-tree-and-content:
- ".repo-to-text-settings.yaml"
- "examples/"
- "MANIFEST.in"
- "setup.py"
# Ignore files and directories for "Contents of ..." section
ignore-content:
- "README.md"
- "LICENSE"
- "tests/"
```
You can copy this file from the [existing example in the project](https://github.com/kirill-markin/repo-to-text/blob/main/.repo-to-text-settings.yaml) and adjust it to your needs. This file allows you to specify rules for what should be ignored when creating the text representation of the repository.
### Configuration Options
- **gitignore-import-and-ignore**: Ignore files and directories specified in `.gitignore` for all sections.
- **ignore-tree-and-content**: Ignore files and directories for the tree and "Contents of ..." sections.
- **ignore-content**: Ignore files and directories only for the "Contents of ..." section.
Using these settings, you can control which files and directories are included or excluded from the final text file.
## Contributing ## Contributing
Contributions are welcome! If you have any suggestions or find a bug, please open an issue or submit a pull request. Contributions are welcome! If you have any suggestions or find a bug, please open an issue or submit a pull request.

View file

@ -5,7 +5,7 @@ with open('requirements.txt') as f:
setup( setup(
name='repo-to-text', name='repo-to-text',
version='0.2.0', version='0.2.1',
author='Kirill Markin', author='Kirill Markin',
author_email='markinkirill@gmail.com', author_email='markinkirill@gmail.com',
description='Convert a directory structure and its contents into a single text file, including the tree output and file contents in markdown code blocks. It may be useful to chat with LLM about your code.', description='Convert a directory structure and its contents into a single text file, including the tree output and file contents in markdown code blocks. It may be useful to chat with LLM about your code.',