You are not logged in.

#1 2010-10-03 15:44:01

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Use the google shortener in a script.

Google offers now an url shortener: http://goo.gl/ . Is it possible to use it in a script? I used to use www.tinyurl.com that you can easily access in a script: for example (assuming that $url contains the url to be shortened) by:

wget -O - http://tinyurl.com/api-create.php?url=${url}

I do not have found a documentation do do the same with the google one but I am sure it must be very easy.

Accessing these kind of service with a little script can be very convenient: for example you put the url in the clipboard, press a key and the url in the clipboard is automatically shortened.

Offline

#2 2010-10-03 15:54:59

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Use the google shortener in a script.

Moved to Workstation User.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2010-10-03 16:03:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Use the google shortener in a script.

It's not going to be easier than tinyurl, as there's no easy API available. The page is AJAX and doesn't actually refresh when a link is submitted.

That said, a quick search got me this...

http://www.mydigitallife.info/2010/01/2 … on-add-on/

Offline

#4 2010-10-03 17:42:49

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Use the google shortener in a script.

there was a vimperator plugin that used it, but it stopped working (I assume they changed something to stop people from using their service)

Offline

Board footer

Powered by FluxBB