created readme file and added extra stuff to cargo.toml for installation and information
This commit is contained in:
parent
0576dc0ea4
commit
f6de07aa58
3 changed files with 104 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -144,7 +144,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "dolltool"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"num-bigint",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
[package]
|
||||
year = "2026"
|
||||
license = "GPL-3.0"
|
||||
license = "GPL-3.0-or-later"
|
||||
name = "dolltool"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
authors = ["ika4422"]
|
||||
description = "A simple dollcode encoder, decoder, and generator inside your terminal :3"
|
||||
edition = "2024"
|
||||
|
|
@ -12,3 +12,7 @@ clap = { version = "4.5.57", features = ["derive"] }
|
|||
num-bigint = "0.4.6"
|
||||
num-traits = "0.2.19"
|
||||
rand = "0.10.0"
|
||||
|
||||
[[bin]]
|
||||
name = "dolltool"
|
||||
path = "src/main.rs"
|
||||
|
|
|
|||
97
README.md
Normal file
97
README.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# dolltool
|
||||
|
||||
A simple dollcode encoder, decoder, and generator inside your terminal :3
|
||||
|
||||
## About
|
||||
|
||||
Being technical, this is a high-performance, arbitrary-precision ternary encoder
|
||||
and decoder formatted into patterns using a set of block symbols (`▖`, `▘`,
|
||||
`▌`), also known as a 2-track pharmacode. Additionally, this program can also
|
||||
generate codes based on patterns entered by the user.
|
||||
|
||||
This project was inspired by [noe](https://noe.sh/) and its [dollcode transcoder](https://noe.sh/dollcode/).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
git clone https://git.gay/ika4422/dolltool.git
|
||||
# or
|
||||
git clone https://codeberg.org/ika4422/dolltool.git
|
||||
cd dolltool
|
||||
cargo install --path .
|
||||
```
|
||||
|
||||
This will install the `dolltool` binary to your `~/.cargo/bin` directory, so to
|
||||
execute anywhere from your terminal you must add `~/.cargo/bin` to your path.
|
||||
|
||||
## Usage
|
||||
|
||||
### Encoding
|
||||
|
||||
By default, dolltool treats inputs as integers:
|
||||
|
||||
```bash
|
||||
$ dolltool -e 123
|
||||
▖▖▖▖▌
|
||||
```
|
||||
|
||||
To encode a string you simply add the text flag `-t` (or `--text`):
|
||||
|
||||
```bash
|
||||
$ dolltool -e "hello world :3" -t
|
||||
▌▘▖▘ ▌▖▌▘ ▌▘▘▌ ▌▘▘▌ ▌▘▌▌ ▌▖▘ ▌▌▌▘ ▌▘▌▌ ▌▌▖▌ ▌▘▘▌ ▌▖▌▖ ▌▖▘ ▖▌▖▖ ▖▘▖▌
|
||||
```
|
||||
|
||||
### Decoding
|
||||
|
||||
```bash
|
||||
$ dolltool -d ▖▖▖▖▌
|
||||
123
|
||||
```
|
||||
|
||||
### Generation
|
||||
|
||||
Generates random codes based on a user-defined pattern:
|
||||
|
||||
- `n`: Number (0-9)
|
||||
- `l`: Letter (a-z)
|
||||
- `a`: Alphanumeric (0-9, a-z)
|
||||
|
||||
```bash
|
||||
$ dolltool -g "nn-lll" -c 3
|
||||
74-igm :: ▖▘▌▖ ▖▘▘▖ ▖▖▘▌ ▌▘▖▌ ▌▘▖▖ ▌▘▌▖
|
||||
01-ldc :: ▖▖▌▌ ▖▘▖▖ ▖▖▘▌ ▌▘▘▌ ▌▖▌▖ ▌▖▘▌
|
||||
44-mpx :: ▖▘▘▖ ▖▘▘▖ ▖▖▘▌ ▌▘▌▖ ▌▌▖▖ ▌▌▌▌
|
||||
```
|
||||
|
||||
If the generation pattern contains only numbers it will use the integer encoding
|
||||
method as opposed to the string encoding method:
|
||||
|
||||
```bash
|
||||
$ dolltool -g "nnnnnn" -c 3
|
||||
933737 :: ▖▖▌▖▌▌▘▘▖▖▘▖▘
|
||||
088231 :: ▌▌▌▌▘▘▌▘▖▖
|
||||
439614 :: ▖▌▌▌▘▘▘▘▌▘▘▌
|
||||
```
|
||||
|
||||
## How it Works
|
||||
|
||||
dolltool uses a bijective base-3 system, this means unlike standard base-3 which
|
||||
uses 0, 1, and 2, it uses 1, 2, and 3. This removes the leading zeros which are
|
||||
often present in standard base-3.
|
||||
|
||||
Symbol | Value
|
||||
-------|-----
|
||||
`▖` |1
|
||||
`▘` |2
|
||||
`▌` |3
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2026 ika4422, under [GNU GPL-3.0-or-later](https://www.gnu.org/licenses/).
|
||||
|
||||
See the `LICENSE` file or run:
|
||||
|
||||
```bash
|
||||
dolltool --license
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue