From 096fb744a35259c80d9ea91debe2a435e9f76650 Mon Sep 17 00:00:00 2001 From: surya Date: Sat, 7 Oct 2023 23:38:23 +0530 Subject: [PATCH] Publish --- Cargo.lock | 2 +- Cargo.toml | 8 +++++++- README.md | 29 +++++++++++++++++++++++++++++ src/main.rs | 1 - 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/Cargo.lock b/Cargo.lock index f855e67..42c9cf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,7 +103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] -name = "enc" +name = "enc-check" version = "0.1.0" dependencies = [ "clap", diff --git a/Cargo.toml b/Cargo.toml index 979092e..c6831bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,13 @@ [package] -name = "enc" +name = "enc-check" version = "0.1.0" edition = "2021" +authors = ["cool-mist "] +license = "GPL v3" +description = "A tool to inspect character encodings" +homepage = "https://github.com/cool-mist/enc" +repository = "https://github.com/cool-mist/enc" +keywords = ["encodings", "utf-8", "utf8", "unicode"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..b92f34d --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# enc # + +## Usage ## + +Inspect character encodings. + +`enc-check asdᚢ𐌰` + +``` +┌───────┬───────┬───────────┬──────┬─────┬─────┬──────────┐ +│ U+dec │ U+hex │ character │ byte │ hex │ dec │ bin │ +├───────┼───────┼───────────┼──────┼─────┼─────┼──────────┤ +│ 97 │ 61 │ a │ 0 │ 61 │ 97 │ 01100001 │ +│ 115 │ 73 │ s │ 1 │ 73 │ 115 │ 01110011 │ +│ 100 │ 64 │ d │ 2 │ 64 │ 100 │ 01100100 │ +│ 5794 │ 16a2 │ ᚢ │ 3 │ e1 │ 225 │ 11100001 │ +│ │ │ │ 4 │ 9a │ 154 │ 10011010 │ +│ │ │ │ 5 │ a2 │ 162 │ 10100010 │ +│ 66352 │ 10330 │ 𐌰 │ 6 │ f0 │ 240 │ 11110000 │ +│ │ │ │ 7 │ 90 │ 144 │ 10010000 │ +│ │ │ │ 8 │ 8c │ 140 │ 10001100 │ +│ │ │ │ 9 │ b0 │ 176 │ 10110000 │ +└───────┴───────┴───────────┴──────┴─────┴─────┴──────────┘ +``` + +## Installation ## + +`cargo install enc-check` + diff --git a/src/main.rs b/src/main.rs index 4c42326..7788397 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ use clap::Parser; - use tabled::{ builder::Builder, settings::{Modify, object::Rows, Alignment, Style}