logankoester / tweetshrink

API Wrapper for TweetShrink

Home Page:http://blog.logankoester.com/tweetshrink-gem-for-ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

API Wrapper for TweetShrink

http://blog.logankoester.com/tweetshrink-gem-for-ruby

License:MIT License


Languages

Language:Ruby 100.0%