A Rust-based file processor that recursively processes directories, applies syntax highlighting to files, and provides structured error handling using anyhow
and thiserror
.
- Recursively processes directories and files.
- Syntax highlighting using
syntect
. - Custom error handling with
thiserror
. - Configurable options like depth, file extensions, and exclusion lists.
- Colored output for better visibility.
Run the program with the desired directory:
cargo run -- <path> [options]
<path>
(optional, default:.
): The file or directory to process.--depth <n>
: Depth level for recursive search.--ext <extension>
: Filter files by extension.--no-color
: Disable colored output.--list
: List files instead of printing content.--json
: Prints the listings in json format
cargo run -- ./src --ext rs --list
Lists all .rs
files in the src
directory.
anyhow
: Simplified error handling.thiserror
: Custom error types.clap
: Command-line argument parsing.colored
: Colorful terminal output.log
andsimple_logger
: Logging.syntect
: Syntax highlighting.