Repo-to-text

Latest version: v0.5.4

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.1.4

- More examples are added to the readme file.

0.1.3

Logging cleanup for non text files

0.1.2

- Pip added with examples
- Code cleanup

0.1.1

0.1

We are thrilled to announce the release of **repo-to-text v1.0.0**! This tool simplifies the process of converting the structure and contents of a directory into a single, shareable text file.

๐Ÿš€ Features

- **Directory Structure Representation**: Generates a detailed text representation of your directoryโ€™s structure.
- **Tree Command Output**: Includes the output of the `tree` command for a clear visual of the directory hierarchy.
- **Markdown Code Blocks**: Encapsulates the contents of each file in markdown code blocks for easy readability.
- **Clipboard Integration**: Automatically copies the generated text to your clipboard for seamless sharing.
- **Easy Installation**: Install via pip or Homebrew.

๐Ÿ“ฆ Installation

Install Locally for Development

1. Clone the repository:

bash
git clone https://github.com/kirill-markin/repo-to-text
cd repo-to-text


2. Install the package locally:

bash
pip install -e .


Installing Dependencies

To install all the required dependencies, run the following command:

bash
pip install -r requirements.txt


๐Ÿ› ๏ธ Usage

After installation, navigate to the directory you want to convert and run:

bash
repo-to-text


This will create a file named `repo_snapshot_YYYY-MM-DD-HH-MM-SS-UTC.txt` in the current directory with the text representation of the repository. The contents of this file will also be copied to your clipboard for easy sharing.

Options

- `--output-dir <path>`: Specify an output directory where the generated text file will be saved.

bash
repo-to-text --output-dir /path/to/output


- `--debug`: Enable DEBUG logging.

bash
repo-to-text --debug


๐Ÿ“„ Example Output

Check out the [example output for this repository](examples/example_repo_snapshot_2024-06-08-10-30-33-UTC.txt) to see what the generated text file looks like.

๐Ÿงช Running Tests

To run the tests, use the following command:

bash
pytest


๐Ÿšฎ Uninstall

To uninstall the package, run the following command from the directory where the repository is located:

bash
pip uninstall repo-to-text


๐Ÿ‘ฅ Contributing

Contributions are welcome! If you have any suggestions or find a bug, please open an issue or submit a pull request.

๐Ÿ“œ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

๐Ÿ“ง Contact

This project is maintained by [Kirill Markin](https://github.com/kirill-markin). For any inquiries or feedback, please contact [markinkirillgmail.com](mailto:markinkirillgmail.com).

Page 3 of 3

ยฉ 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.