public
Description: API Wrapper for TweetShrink
Homepage: http://blog.logankoester.com/tweetshrink-gem-for-ruby
Clone URL: git://github.com/logankoester/tweetshrink.git
logankoester (author)
Sat Jun 13 04:40:53 -0700 2009
commit  9a7b88b479ee81599b3636c6b7769a15b95ffcf2
tree    4db2f9440f7b917e84a9d1d6b7af296bae3de0dc
parent  ba7d45b26ec828e6f9bf61f5226c8d332acc0c6c
name age message
file .gitignore Thu Mar 05 18:35:01 -0800 2009 0.1 release [logankoester]
file LICENSE Thu Mar 05 17:59:20 -0800 2009 Initial commit to tweetshrink. [logankoester]
file README.textile Sat Jun 13 04:40:49 -0700 2009 Added \'tweetshrink\' program for command-line ... [logankoester]
file Rakefile Sat Jun 13 04:40:49 -0700 2009 Added \'tweetshrink\' program for command-line ... [logankoester]
file VERSION.yml Thu Mar 05 18:35:01 -0800 2009 0.1 release [logankoester]
directory features/ Thu Mar 05 17:59:20 -0800 2009 Initial commit to tweetshrink. [logankoester]
directory lib/ Thu Mar 05 18:35:01 -0800 2009 0.1 release [logankoester]
directory spec/ Tue May 19 00:21:45 -0700 2009 Fixed path in spec_helper and description in ge... [logankoester]
file tweetshrink.gemspec Sat Jun 13 04:40:53 -0700 2009 Regenerated gemspec for version 0.0.0 [logankoester]
README.textile

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.