#file #toolkit #versatile #kitty #utf-8 #conversion

bin+lib file-kitty

A versatile file manipulation toolkit with async support

2 releases

new 0.1.1 Jan 27, 2025
0.1.0 Jan 27, 2025

#626 in Encoding

Download history 102/week @ 2025-01-22

102 downloads per month

MIT license

10KB
142 lines

File Kitty

A versatile file manipulation toolkit written in Rust.

Features

  • File encoding detection and conversion
  • More features coming soon...

Installation

cargo install file-kitty

Usage

The command line tool is named kt (short for kitty).

Encoding Detection and Conversion

Scan a directory for files with different encodings:

kt encoding --path /path/to/directory

Options:

  • -p, --path: Directory path to scan
  • -a, --auto-convert: Automatically convert non-UTF-8 files to UTF-8
  • -v, --verbose: Show detailed encoding information

License

MIT


lib.rs:

A toolkit for file operations with a focus on encoding detection and conversion

Features

  • Automatic encoding detection
  • Batch conversion of non-UTF-8 files to UTF-8
  • Smart binary file detection
  • Interactive mode for bulk operations

Example

use file_kitty::encoding::scan_directory;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    scan_directory("./my_project", false, false).await?;
    Ok(())
}

Dependencies

~7–16MB
~252K SLoC