Skip to content

toddlers/rcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

cargo run -- <path> [options]

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

Example

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.

About

recursively cat files in a directory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published