Commit 943e992d by Mark Wunsch

Update to README

parent 9178177e
...@@ -10,7 +10,6 @@ Why would you want to do this? Read this _forthcoming_ blog post: ... ...@@ -10,7 +10,6 @@ Why would you want to do this? Read this _forthcoming_ blog post: ...
>By doing this, you can ensure that users across devices can see the author’s intention. You can always show users an image, but you can’t show them a range of characters their system does not support. >By doing this, you can ensure that users across devices can see the author’s intention. You can always show users an image, but you can’t show them a range of characters their system does not support.
## Usage ## Usage
Rumoji.encode(str) Rumoji.encode(str)
...@@ -19,8 +18,40 @@ Why would you want to do this? Read this _forthcoming_ blog post: ... ...@@ -19,8 +18,40 @@ Why would you want to do this? Read this _forthcoming_ blog post: ...
Rumoji.decode(str) Rumoji.decode(str)
# Does the reverse # Does the reverse
Rumoji.encode_io(read, write)
# For an IO pipe (a read stream, and a write stream), transform Emoji from the
# read end, and write the cheat-sheet codes on the write end.
Rumoji.decode_io(read, write)
# Same thing but in reverse!
## Installation
gem install rumoji
Note that rumoji has only been tested in Ruby 1.9!!!
### Some examples:
puts Rumoji.encode("Lack of cross-device emoji support makes me 😭")
#=> Lack of cross-device emoji support makes me :sob:
Here's a fun file:
Rumoji.decode_io($stdin, $stdout)
On the command line
echo "But Rumoji makes encoding issues a :joy:" | ruby ./funfile.rb
#=> But Rumoji makes encoding issues a 😂
Implement the emoji codes from emoji-cheat-sheet.com using a tool like [gemoji](https://github.com/github/gemoji) along with Rumoji, and you'll easily be able to transform user input with raw emoji utf-8 into images you can show to all users.
_Having trouble discerning what's happening in this README?_ You might be on a device with NO emoji support! All the more reason to use Rumoji. Transcode the raw utf-8 into something users can understand across devices!
Thanks! Thanks!
## Copyright ## Copyright
Copyright (c) 2009 - 2012 Mark Wunsch. Licensed under the MIT License. Copyright (c) 2009 - 2012 Mark Wunsch. Licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment