logankoester / tweetshrink
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (1)
- Wiki (1)
- Graphs
-
Tree:
9a7b88b
tweetshrink / 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.
Requirements
Installation
rake gem
gem install pkg/tweetshrink-0.0.1.gem
Shell usage
- You can use STDIN
$ echo “Some text to shrink” | tweetshrink # => “sum text 2 shrnk”
- 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.
