Summary

Installation

grails install-plugin urlreversi

Description

Introduction

What it does

This plugin reverses a shortened url - for example http://tinyurl.com/5d4 or http://ow.ly/ZDrQ

This plugin really does nothing special. It just detects to which original url the given shrinked url points to and returns this url.
Given the simple protocol the typical url shrinking facilities follow (http redirect) it should work with almost all existing shortening services.
This plugin provides a service to use from within grails and a convenient tag for direct usage in the web layer. See further documentation below.

Use case example

A typical use case for this plugin can be in an grails app that mashes up with twitter posts. Regardless of what shrinking service is used in any tweet - this plugin should be able to resolve the original link on demand and transparently. This can be useful in community environments to improve user convenience or to do some stats about your "community links".

Similar tools

There are dozens of similar technologies out there. For example users can install the longurlplease Firefox extension from http://www.longurlplease.com to have only original urls while surfing. A more similar technology is the service that is hosted at http://longurl.org. With this plugin such a service can be realized really easy in a grails app.

Ideas for using this plugin within your grails app

You might want to use this plugin in your app:
If you have some shortened links that shall be demystified.
If you want to detect link doublettes from different shortening services.

How to use

How to use the tag(lib)

As a text in your html page

Usage is straight forward:

<div><urlreversi:revert2Long url='http://bit.ly/1t6DhR'/></div>

will result in the text : <div>http://www.spiegel.de</div>

As a link in your html page

If you want to use the long url directly as a link target you can write: