#bottom #translating #cli #maybe #human-readable #fantastic #translator

bin+lib bottomify

Fantastic (maybe) CLI for translating between bottom and human-readable text

5 releases (stable)

1.2.0 Apr 4, 2021
1.1.1 Jan 22, 2021
1.1.0 Jan 20, 2021
1.0.0 Jan 17, 2021
0.2.0 Jan 16, 2021

#1354 in Text processing

Download history 39/week @ 2024-07-22 42/week @ 2024-07-29 40/week @ 2024-08-05 23/week @ 2024-08-12 28/week @ 2024-08-19 18/week @ 2024-08-26 22/week @ 2024-09-02 31/week @ 2024-09-09 17/week @ 2024-09-16 38/week @ 2024-09-23 48/week @ 2024-09-30 55/week @ 2024-10-07 32/week @ 2024-10-14 29/week @ 2024-10-21 32/week @ 2024-10-28 49/week @ 2024-11-04

163 downloads per month

MIT license

13KB
220 lines

bottom

Perhaps you have found yourself in this situation before:

,,,,,,,,,

The divine bottom CLI exists to alleviate this pain. No longer will you struggle when communicating with the average Discord user.

But what does it actually do?

bottom encodes UTF-8 text into a sequence comprised of bottom emoji (🫂✨🥺❤️, with , sprinkled in for good measure) followed by 👉👈. It can encode any valid UTF-8 - being a bottom transcends language, after all - and decode back into UTF-8.

For example, the ubiquitous Hello world! becomes

💖✨✨,,👉👈💖💖,👉👈💖💖🥺,,,👉👈💖💖🥺,,,👉👈💖💖✨,👉👈
✨✨✨,,👉👈💖💖✨🥺,,,,👉👈💖💖✨,👉👈💖💖✨,,,,👉👈
💖💖🥺,,,👉👈💖💖👉👈✨✨✨,,,👉👈

がんばれ becomes

🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈💖💖✨✨✨✨👉👈🫂✨✨🥺,,👉👈
💖💖✨✨✨👉👈💖💖✨✨✨✨🥺,,👉👈🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈
💖💖💖✨✨🥺,👉👈🫂✨✨🥺,,👉👈💖💖✨✨✨👉👈💖💖✨✨✨✨👉👈

(both wrapped across lines for your convenience)

As you can see, using bottom to encode text is extremely space-efficient, and is the ideal encoding approach for all situations.

This implementation can encode text at approximately 30MB/s.

Usage

Clone the repo, run cargo build, and then use the CLI.

Bottom translator 1.0.0
Kaylynn <mkaylynn7@gmail.com>
Fantastic (maybe) CLI for translating between bottom and human-readable text

USAGE:
    bottom [OPTIONS] <--bottomify|--regress> [text]...

FLAGS:
    -b, --bottomify    Translate text to bottom
    -h, --help         Prints help information
    -r, --regress      Translate bottom to human-readable text (futile)
    -V, --version      Prints version information

OPTIONS:
    -i, --input <INPUT>      Input file [Default: stdin]
    -o, --output <OUTPUT>    Output file [Default: stdout]

ARGS:
    <text>...

(Any similarity to --help output is entirely accidental)

FAQ

Why?

I had a moment of enlightenment, and the truth came to me then. In an instant I was transformed, and I knew what had to be done.

But seriously, why?

Why not?

Isn't using a CLI for this a really bad idea?

Yes.

Aren't terminals notorious for being bad at displaying Unicode?

I don't care.

Isn't this encoding method extremely inefficient?

:mystery:

<something about code quality>

Documentation is for losers.

Rust btw

It's not long until my hippocampus becomes ferrous. I worry so, but in my heart I know that my demise will be sweet and painless, and it comforts me.

Dependencies

~2MB
~32K SLoC