1.3.0 :: implemented the text autodetection for decoding which should have been present in 1.1.0 however wasn't because i forgor, also updated the README to reflect changes in encoding and decoding text

This commit is contained in:
ika4422 2026-02-11 20:32:14 +00:00
parent 2f658b0604
commit ca77e33664
No known key found for this signature in database
4 changed files with 33 additions and 14 deletions

View file

@ -28,27 +28,43 @@ execute anywhere from inside your terminal you must add `~/.cargo/bin` to your p
### Encoding
By default, dolltool treats inputs as integers:
If an integer is passed to encode it will by default be encoded as an integer:
```bash
$ dolltool -e 123
▖▖▖▖▌
```
To encode a string you simply add the text flag `-t` (or `--text`):
If you would like to encode an integer as text instead you must pass the `-t`
(`--text`) argument:
```bash
$ dolltool -e "hello world :3" -t
$ dolltool -e 123 -t
▖▘▖▖ ▖▘▖▘ ▖▘▖▌
```
Finally, any non-integer patterns will automatically be encoded as text:
```bash
$ dolltool -e "hello world :3"
▌▘▖▘ ▌▖▌▘ ▌▘▘▌ ▌▘▘▌ ▌▘▌▌ ▌▖▘ ▌▌▌▘ ▌▘▌▌ ▌▌▖▌ ▌▘▘▌ ▌▖▌▖ ▌▖▘ ▖▌▖▖ ▖▘▖▌
```
### Decoding
This works the same for both integers and text:
```bash
$ dolltool -d ▖▖▖▖▌
123
```
```bash
$ cargo run --release -- -d "▌▘▖▘ ▌▖▌▘ ▌▘▘▌ ▌▘▘▌
▌▘▌▌ ▌▖▘ ▌▌▌▘ ▌▘▌▌ ▌▌▖▌ ▌▘▘▌ ▌▖▌▖ ▌▖▘ ▖▌▖▖ ▖▘▖▌"
hello world :3
```
### Generation
Generates random codes based on a user-defined pattern: