This gem provides a Ruby interface to the TweetShrink API, as well as a shell command that can
be used as a filter for your favorite text editor.
What is TweetShrink?
Tweetshrink tries its very best to fit your text within the harsh constraints of a tweet by replacing common phrases and words with shorter representations. Kind of like running your new text through the dryer or sending it to fat camp.
gem install pkg/tweetshrink-0.0.1.gem
- You can use STDIN
$ echo “Some text to shrink” | tweetshrink # => “sum text 2 shrnk”
- or a file
$ tweetshrink [filename]
t = TweetShrink.shrink(“Some text to shrink”)
t[‘text’] # The short text
t[‘original_text’] # The long text
t[‘difference’] # The difference (number of characters eliminated)
Copyright © 2008 Logan Koester. See LICENSE for details.