Crates.io | filecat |
lib.rs | filecat |
version | 0.3.1 |
source | src |
created_at | 2024-07-13 01:21:27.553668 |
updated_at | 2024-07-13 02:22:34.952167 |
description | Print file contents with colored headers |
homepage | https://github.com/manorajesh/filecat |
repository | https://github.com/manorajesh/filecat |
max_upload_size | |
id | 1301962 |
size | 757,368 |
filecat
is a command-line tool for printing file contents with titles.
Print file contents with colored headers
Usage: filecat.exe [OPTIONS] [PATHS]...
Arguments:
[PATHS]... File or directory paths
Options:
-r, --recursive Recursively read directories
-e, --exclude <PATH> Exclude specific files or directories
--header <HEADER> Custom header format [default: "==> {file}"]
-v, --verbose Do not show non-printable characters
--hex Print non-text file contents in hexadecimal format
--color Enable colored output of headers
--no-log-color Disable colored output of log messages
-o, --output <FILE> Write output to a file
--counter Enable file counter
--skip-non-text Skip non-text files but still print headers
-h, --help Print help
-V, --version Print version
To print the contents of a file with a header, simply run filecat
with the file path as an argument:
filecat file.txt
To print the contents of multiple files, provide multiple file paths:
filecat file1.txt file2.txt file3.txt
To print the contents of a directory, use the -r
flag:
filecat -r directory
To exclude specific files or directories from processing, use the -e
flag:
filecat -e file.txt directory
You can install filecat
from crates.io using cargo
:
cargo install filecat
First, ensure you have Rust installed. Then, clone the repository and build the project:
git clone https://github.com/yourusername/filecat.git
cd filecat
cargo build --release
The binary will be located at target/release/filecat
.