Crates.io | repolog |
lib.rs | repolog |
version | 0.1.0 |
source | src |
created_at | 2024-07-11 22:40:09.820541 |
updated_at | 2024-07-11 22:40:09.820541 |
description | A tool for adding title comments to files and exporting files of specific languages from a project. |
homepage | https://github.com/noamteyssier/repolog |
repository | https://github.com/noamteyssier/repolog |
max_upload_size | |
id | 1300088 |
size | 24,494 |
repolog
repolog
is a command-line tool designed to enhance code organization and facilitate code review processes. It provides functionality for adding title comments to files and exporting files of a specific language from a project.
To install repolog
, you need to have Rust and Cargo installed on your system. If you don't have them installed, you can get them from rustup.rs.
Once you have Rust and Cargo, you can install repolog
with cargo
cargo install repolog
repolog
has two main commands: title
and export
.
To add titles to all files of a specific language in a directory:
repolog title --lang <language> <path>
For example, to add titles to all Rust files in the current directory:
repolog title --lang rust .
To export all files of a specific language from a directory:
repolog export --lang <language> --output <output_file> <path>
For example, to export all Python files from the current directory to a file named combined_python_files.py
:
repolog export --lang python --output combined_python_files.py .
If you don't specify an output file, the result will be printed to stdout:
repolog export --lang rust .
Code Review: Export all files of a specific language to a single file for easier review, especially useful for pull requests or code audits.
Project Organization: Add consistent title comments to all files in a project, making it easier to understand the project structure at a glance.
Documentation Generation: Use the export feature to generate a single file containing all code of a specific language, which can be useful for documentation purposes or for creating a "literate programming" style document.
Refactoring: When moving files around in a large project, use the title feature to ensure all files have up-to-date location comments.
Contributions are welcome! Please feel free to submit a Pull Request.