mkdir ~/code
git clone https://github.com/seamusabshere/charlar.rb.git ~/code/charlar.rb
cd ~/code/charlar.rb
bundle
If you don't have bundle
, then run gem install bundler
.
Run send.rb
in one terminal:
~/code/charlar.rb (master) $ ruby send.rb Image
the quick brown fox jumped over the lazy dog
WROTE inbox/1393939955.965494.png
Run receive.rb
in another terminal:
~/code/charlarb (master) $ ruby receive.rb
==================================================
READ inbox/1393939955.965494.png
--------------------------------------------------
the quick brown fox jumped over the lazy dog
As soon as a message is read, it will go to the trash/
folder.
The two options for send.rb
are Image
and Text
.
It just writes the text into a file.
It uses the ASCII character code (97 for 'a', etc.) in the Red channel of a PNG.
For example, "the quick brown fox jumped over the lazy dog" looks like:
Copyright 2014 Bettina Miguez and Seamus Abshere