Giter VIP home page Giter VIP logo

bottom's Introduction

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 <[email protected]>
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.

bottom's People

Contributors

lyricly avatar redgoldlace avatar rocketrace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.