Wiki

Clone wiki

Googlus / Home

Googlus

Source Style | Ticket Guidelines | Contributing

Googlus is a Ruby wrapper around Google URL Shortener REST API.

I often use URL shortener services and I was like "It would be cool if I could use it in Textmate, in my Ruby code or on the command-line!" so I wrote this thin lib to be able to do that.

Googlus features are:

  • shorten URLs
  • Expand URLs
  • Analyze URLs usage
  • and more (Googlus will evolve) ...
  • is developed from scratch (not based on any other code)
  • multi-platform (GNU/Linux, *BSD, Windows & other)
  • 100% MIT & free

Requirements

Install

$ sudo gem install googlus

Usage

require 'rubygems'
require 'googlus'

Googlus::Shorten.new(long_url).short_url
Googlus::Expand.new(short_url).url
Googlus::Analytic.new(url).to_s

On the command-line:

$ googlus -s http://www.bounga.org # Shorten URL
$ googlus -e http://goo.gl/arOIJ   # Expand short URL
$ googlus -a http://goo.gl/arOIJ   # Get analytics for short URL
$ googlus -h # Up to date list of options

Get the source

$ hg clone https://bitbucket.org/Bounga/googlus

Other

If you want to contribute you should take a look at:

Problems, comments, and suggestions are welcome on the ticket system

Updated