Posted on June 13, 2009, 8:01 am, by Logan Koester, under
posts.
As a Web Service
TweetShrink, a web service from TRNSFR, uses a database of common instant / text messaging abbreviations to reduce the number of characters in a tweet. It's essentially a human-readable compression algorithm. For example, "Some text to shrink" becomes "sum text 2 shrnk" when passed through their API.
But it doesn't enforce Twitter's 140 [...]
Posted on March 6, 2009, 3:41 pm, by Logan Koester, under
posts.
TweetShrink's API is so simple that this gem barely adds anything on top of HTTParty, but here it is.
require 'rubygems'
require 'tweetshrink'
t = TweetShrink.shrink "One wonders why"
# t['difference'] => 4
# t['text'] => "1 wonders y"
# t['original_text'] => "One wonders why"
You can get it from my github account, here, or via rubygems like
$ sudo gem install logankoester-tweetshrink
Enjoy.