logankoester / tweetshrink

API Wrapper for TweetShrink

This URL has Read+Write access

tweetshrink / README.textile
100644 40 lines (24 sloc) 1.054 kb

TweetShrink

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.

More

Requirements

HTTParty

Installation

rake gem
gem install pkg/tweetshrink-0.0.1.gem

Shell usage

  1. You can use STDIN
    $ echo “Some text to shrink” | tweetshrink # => “sum text 2 shrnk”
  1. or a file
    $ tweetshrink [filename]

Ruby usage

require ‘tweetshrink’
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

Copyright © 2008 Logan Koester. See LICENSE for details.