Crates.io | cha-rs |
lib.rs | cha-rs |
version | 0.0.3 |
source | src |
created_at | 2023-11-07 21:53:11.441729 |
updated_at | 2023-11-07 22:11:21.891072 |
description | Extract specific characters from an input. |
homepage | https://github.com/jj-style/cha-rs |
repository | https://github.com/jj-style/cha-rs |
max_upload_size | |
id | 1028464 |
size | 60,157 |
A simple library and app to extract specific characters from an input string. Useful for when you need to verify arbitrary characters of your long random password for your bank.
For example:
$ bw get password <mybank> | cha-rs -c 3 -c 11 -c 16
# 3 => C
# 11 => !
# 16 => p
(Please note, those characters are made up and do not belong to any of my passwords! :D)
Originally I created a pull request to Bitwarden (https://github.com/bitwarden/clients/pull/5042) to add this functionality to the command line app. But that feels a bit over-engineered and it is more inline with the Unix philosophy to create a small program that does one thing well, accepting text as its input, and writing text as its output. So here it is!
cargo install cha-rs
git clone https://github.com/jj-style/cha-rs.git
cd cha-rs
cargo install --path .
docker pull ghcr.io/jj-style/cha-rs:latest
echo hello | docker run --rm -i ghcr.io/jj-style/cha-rs -c 1 -c 3 -c 5
See CONTRIBUTING.md.
Project template generated using https://rust-github.github.io/.