An open API service indexing awesome lists of open source software.

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

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.