A simple dollcode encoder, decoder, and generator inside your terminal :3 GPL-3.0-or-later
Find a file
2026-02-11 00:11:57 +00:00
src v1.1.0 :: added autodetection for strings instead of requiring text flag for encoding and added encode as string override with text flag to pattern generation 2026-02-10 21:09:16 +00:00
.gitignore initial commit :3c 2026-02-09 14:24:35 +00:00
Cargo.lock 1.1.1 :: removed unused toml thingy for year :3 2026-02-11 00:11:57 +00:00
Cargo.toml 1.1.1 :: removed unused toml thingy for year :3 2026-02-11 00:11:57 +00:00
LICENSE added license information (GPL3) :3 2026-02-09 21:59:16 +00:00
README.md fixed weird grammar in the readme 2026-02-09 23:45:19 +00:00

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 generate codes based on patterns entered by the user.

This project was inspired by noe and its dollcode transcoder.

Installation

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 inside your terminal you must add ~/.cargo/bin to your path.

Usage

Encoding

By default, dolltool treats inputs as integers:

$ dolltool -e 123
▖▖▖▖▌

To encode a string you simply add the text flag -t (or --text):

$ dolltool -e "hello world :3" -t
▌▘▖▘ ▌▖▌▘ ▌▘▘▌ ▌▘▘▌ ▌▘▌▌ ▌▖▘ ▌▌▌▘ ▌▘▌▌ ▌▌▖▌ ▌▘▘▌ ▌▖▌▖ ▌▖▘ ▖▌▖▖ ▖▘▖▌

Decoding

$ 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)
$ 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:

$ 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.

See the LICENSE file or run:

dolltool --license