https://github.com/toddlers/rcat
recursively cat files in a directory
https://github.com/toddlers/rcat
rust unix-utility
Last synced: 3 months ago
JSON representation
recursively cat files in a directory
- Host: GitHub
- URL: https://github.com/toddlers/rcat
- Owner: toddlers
- Created: 2025-03-02T17:41:24.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-02T17:42:44.000Z (3 months ago)
- Last Synced: 2025-03-02T18:33:38.882Z (3 months ago)
- Topics: rust, unix-utility
- Language: Rust
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# File Processor
A Rust-based file processor that recursively processes directories, applies syntax highlighting to files, and provides structured error handling using `anyhow` and `thiserror`.
## Features
- 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.## Usage
Run the program with the desired directory:```sh
cargo run -- [options]
```### Options:
- `` (**optional**, default: `.`): The file or directory to process.
- `--depth `: Depth level for recursive search.
- `--ext `: Filter files by extension.
- `--no-color`: Disable colored output.
- `--list`: List files instead of printing content.
- `--json`: Prints the listings in json format## Example
```sh
cargo run -- ./src --ext rs --list
```
Lists all `.rs` files in the `src` directory.## Dependencies
- `anyhow`: Simplified error handling.
- `thiserror`: Custom error types.
- `clap`: Command-line argument parsing.
- `colored`: Colorful terminal output.
- `log` and `simple_logger`: Logging.
- `syntect`: Syntax highlighting.