Ecoji ๐ฃ๐๐ฆ๐ผ
Ecoji encodes data as emojis. As a bonus, includes code to decode emojis to original data.
Examples of running
Encode example :
$ echo "Base64 is so 1999, isn't there something better?" | ecoji
๐๐ฉ๐ฆ๐๐๐๐ฏ๐๐๐ฝ๐๐๐ฑ๐ฅ๐๐ฑ๐๐ญ๐ฎ๐ต๐ข๐ฅ๐ญ๐ธ๐๐ฒ๐ฆ๐ถ๐ข๐ฅ๐ฎ๐บ๐๐ธ๐ฎ๐ผ๐ฆ๐๐ฅด๐
Decode example :
$ echo ๐๐ฉ๐ฆ๐๐๐๐ฏ๐๐๐ฝ๐๐๐ฑ๐ฅ๐๐ฑ๐๐ญ๐ฎ๐ต๐ข๐ฅ๐ญ๐ธ๐๐ฒ๐ฆ๐ถ๐ข๐ฅ๐ฎ๐บ๐๐ธ๐ฎ๐ผ๐ฆ๐๐ฅด๐ | ecoji -d
Base64 is so 1999, isn't there something better?
Concatenation :
$ echo -n abc | ecoji
๐๐ธ๐โ
$ echo -n 6789 | ecoji
๐ฅ๐ค ๐ ๐
$ echo XY | ecoji
๐ฒ๐ก๐โ
$ echo ๐๐ธ๐โ๐ฅ๐ค ๐ ๐๐ฒ๐ก๐โ | ecoji -d
abc6789XY
Make your hashes more interesting.
$ cat encode.go | openssl dgst -binary -sha1 | ecoji
๐ฐ๐๐ก๐๐ถ๐ฆ
๐ก๐บ๐๐๐ก๐ฆ๐๐๐๐ฆ
$ echo ๐ฐ๐๐ก๐๐ถ๐ฆ
๐ก๐บ๐๐๐ก๐ฆ๐๐๐๐ฆ | ecoji -d | openssl base64
GhAkTyOY/Pta78KImgvofylL19M=
$ cat encode.go | openssl dgst -binary -sha1 | openssl base64
GhAkTyOY/Pta78KImgvofylL19M=
Data encoded with Ecoji sorts the same as the input data.
$ echo -n a | ecoji > /tmp/stest.ecoji
$ echo -n ab | ecoji >> /tmp/test.ecoji
$ echo -n abc | ecoji >> /tmp/test.ecoji
$ echo -n abcd | ecoji >> /tmp/test.ecoji
$ echo -n ac | ecoji >> /tmp/test.ecoji
$ echo -n b | ecoji >> /tmp/test.ecoji
$ echo -n ba | ecoji >> /tmp/test.ecoji
$ export LC_ALL=C
$ sort /tmp/test.ecoji > /tmp/test-sorted.ecoji
$ diff /tmp/test.ecoji /tmp/test-sorted.ecoji
$ cat /tmp/test-sorted.ecoji
๐๐ฒโโ
๐๐ธ๐โ
๐๐ธ๐ฆโ
๐๐โโ
๐โโโ
๐๐ขโโ
Usage :
$ ecoji -h
usage: ecoji [OPTIONS]... [FILE]
Encode or decode data as Unicode emojis. ๐
Options:
-d, --decode decode data
-w, --wrap=COLS wrap encoded lines after COLS character (default 76).
Use 0 to disable line wrapping
-h, --help Print this message
-v, --version Print version information.
Libraries
Libraries implementing the Ecoji encoding standard. Submit PR to add a library to the table.
| Language |
Comments |
| Go |
This repository offers a Go library package with two functions ecoji.Encode() and ecoji.Decode(). |
| Java |
Coming soon, I plan to implement this and publish to maven central unless someone else does. |
Build instructions.
This is my first Go project, I am starting to get my bearings. If you are new
to Go I would recommend this video and the tour.
# The following are general Go setup instructions. Ignore if you know Go, I am new to it.
export GOPATH=~/go
export PATH=$GOPATH/bin:$PATH
# This will download Ecoji to $GOPATH/src
go get github.com/keith-turner/ecoji
# This will build the ecoji command and put it in $GOPATH/bin
go install github.com/keith-turner/ecoji/cmd/ecoji