2017 © Pedro Pelรกez
 

library ecoji

Encodes (and decodes) data as emojis. Implementation of the Ecoji Standard.

image

rayne/ecoji

Encodes (and decodes) data as emojis. Implementation of the Ecoji Standard.

  • Sunday, March 18, 2018
  • by Rayne
  • Repository
  • 3 Watchers
  • 31 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

Ecoji for PHP ๐Ÿฃ๐Ÿ”‰๐Ÿฆ๐Ÿ”ผ๐Ÿ‰๐Ÿ”น๐Ÿฆ’๐Ÿ“ฒ๐Ÿ’๐Ÿ๐Ÿ€„โ˜•

Ecoji encodes data as 1024 emojis. It's like base1024 with an emoji character set. Visit ecoji.io to try Ecoji in your browser., (*1)

rayne/ecoji is a PHP port of Ecoji with 100% test coverage., (*2)

Latest Stable Version Code Coverage Scrutinizer Code Quality License, (*3)

Contents

Installation

composer require rayne/ecoji

Encoding

use Rayne\Ecoji\Ecoji;

$ecoji = new Ecoji;
$ecoji->encode("Base64 is so 1999, isn\'t there something better?\n");
๐Ÿ—๐Ÿ“ฉ๐ŸŽฆ๐Ÿ‡๐ŸŽ›๐Ÿ“˜๐Ÿ”ฏ๐Ÿšœ๐Ÿ’ž๐Ÿ˜ฝ๐Ÿ†–๐ŸŠ๐ŸŽฑ๐Ÿฅ๐Ÿš„๐ŸŒฑ๐Ÿ’ž๐Ÿ˜ญ๐Ÿ’ฎ๐Ÿ‡ต๐Ÿ’ข๐Ÿ•ฅ๐Ÿญ๐Ÿ”ธ๐Ÿ‰๐Ÿšฒ๐Ÿฆ‘๐Ÿถ๐Ÿ’ข๐Ÿ•ฅ๐Ÿ”ฎ๐Ÿ”บ๐Ÿ‰๐Ÿ“ธ๐Ÿฎ๐ŸŒผ๐Ÿ‘ฆ๐ŸšŸ๐Ÿฅด๐Ÿ“‘

Decoding

use Rayne\Ecoji\Ecoji;

$ecoji = new Ecoji;
$ecoji->decode('๐Ÿ—๐Ÿ“ฉ๐ŸŽฆ๐Ÿ‡๐ŸŽ›๐Ÿ“˜๐Ÿ”ฏ๐Ÿšœ๐Ÿ’ž๐Ÿ˜ฝ๐Ÿ†–๐ŸŠ๐ŸŽฑ๐Ÿฅ๐Ÿš„๐ŸŒฑ๐Ÿ’ž๐Ÿ˜ญ๐Ÿ’ฎ๐Ÿ‡ต๐Ÿ’ข๐Ÿ•ฅ๐Ÿญ๐Ÿ”ธ๐Ÿ‰๐Ÿšฒ๐Ÿฆ‘๐Ÿถ๐Ÿ’ข๐Ÿ•ฅ๐Ÿ”ฎ๐Ÿ”บ๐Ÿ‰๐Ÿ“ธ๐Ÿฎ๐ŸŒผ๐Ÿ‘ฆ๐ŸšŸ๐Ÿฅด๐Ÿ“‘');
Base64 is so 1999, isn't there something better?

Streams

use Rayne\Ecoji\Ecoji;

$ecoji = new EcojiStream;
$ecoji->encode($sourceStream, $destinationStream);
$ecoji->decode($sourceStream, $destinationStream);

EcojiStream doesn't wrap the encoded stream without configuring the wrap length first. A value of 0 disables wrapping., (*4)

use Rayne\Ecoji\Ecoji;

$ecoji = new EcojiStream;
$ecoji->setWrap(80);

CLI

The CLI encodes and decodes files and streams., (*5)

./bin/ecoji --help
Usage: ecoji [OPTIONS]... [FILE]

Encode or decode data as Unicode emojis. ๐Ÿ˜

Options:
    -d, --decode          Decode data.
    -w, --wrap COLS       Wrap encoded lines after COLS characters (default 76).
                          Use 0 to disable line wrapping.
    -h, --help            Print this message.
    -v, --version         Print version information.

Installing the Composer package rayne/ecoji will create a symlink, e.g. vendor/bin/ecoji., (*6)

Docker

Launch a temporary Ecoji Docker container to utilize the CLI:, (*7)

docker run -it --rm rayne/ecoji --help

Pipe data through a container:, (*8)

echo -n "Ecoji for Docker" | docker run -i --rm rayne/ecoji
๐Ÿฃ๐Ÿ”‰๐Ÿฆ๐Ÿ”ผ๐Ÿ‰๐Ÿ”น๐Ÿฆ’๐Ÿ“ฒ๐ŸŸ๐Ÿ™๐ŸŽง๐Ÿค’๐Ÿ’™โ˜•โ˜•โ˜•

Encode or decode a file by mounting it as volume or piping its content through a container:, (*9)

docker run -it --rm -v /my/message:/file rayne/ecoji /file
cat /my/message | docker run -i --rm rayne/ecoji

Docker Images

The docker/README.md explains how to build the application and all optional development images for all supported PHP versions. Additional convenience scripts run the unit tests with all supported PHP versions., (*10)

Tests

The library registers the test runner as composer script., (*11)

composer test

All units tests can also be run in the development containers specified in the docker directory., (*12)

The Versions

18/03 2018

dev-master

9999999-dev

Encodes (and decodes) data as emojis. Implementation of the Ecoji Standard.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

by Dennis Meckel

encoding decoding emoji ecoji base1024

15/03 2018

1.1.0

1.1.0.0

Encodes (and decodes) data as emojis. Implementation of the Ecoji Standard.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

by Dennis Meckel

encoding decoding emoji ecoji base1024

14/03 2018

1.0.1

1.0.1.0

Encodes (and decodes) data as emojis. Implementation of the Encoji/Ecoji Standard.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

by Dennis Meckel

encoding decoding emoji ecoji encoji

13/03 2018

1.0.0

1.0.0.0

Encodes (and decodes) data as emojis. Implementation of the Encoji/Ecoji Standard.

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-mbstring *

 

The Development Requires

by Dennis Meckel

encoding decoding emoji ecoji encoji