September 8, 2008

Extension of the Week: TinyURL

The extension I’m focusing on this week is TinyURL which generates a shorten url for your MindTouch TinyURL Deki pages. This is beneficial when you have a deep hierarchy and want a quick url to send to people. There is something unique about this extension, you don’t have to install anything. This extension was created using DekiScript.

To invoke the extension, paste the following code in a MindTouch Deki page:

{{ web.link(web.text(uri.build("http://tinyurl.com/api-create.php", _,
{  url: page.uri }))) }}

It will turn this:
http://wiki.developer.mindtouch.com/DekiScript/FAQ/How_do_I…_Generate_a_TinyURL_for_my_pages_automatically%3f

into this:

http://tinyurl.com/58j9ea

This script is dynamic, so it will create a new url for each page it is pasted on without having to change anything.

I encourage you to read more about DekiScript and how it can enhance your Deki install.

If you have any questions please feel free to contact us or post a comment.

2 Comments »

  1. I cut and pasted the above TINYURL “extension” into a Deki which uses 8.05.1 and received the following error message:

    reference to undefined name ‘uri.build’

    What are the version requirements for this extension?

    Comment by Aurora — September 10, 2008 @ 8:06 am

  2. Aurora,

    Sorry for not clarifying. The above DekiScript uses uri.build which is functionality that is in 8.05.2 or higher.

    Comment by coreyg — September 10, 2008 @ 8:14 am

RSS feed for comments on this post. TrackBack URL

Leave a comment