Monday, November 08, 2010 at 12:00 AM.
system.verbs.apps.bitly.create
on create (longUrl, flManage=false, appName=nil) {
<<Changes
<<4/1/09; 11:50:35 AM by DW
<<If user.trim.prefs.flHijackBitly is defined and true, shoot the url through tr.im.
<<7/8/08; 12:25:04 PM by DW
<<Created. Bitly is an url-shortening service with lots of professional features. You could use it for a serious web app that wants to monitor its usage. This glue script creates a short url from a long one.
try { //4/1/09 by DW
if user.trim.prefs.flHijackBitly {
return (trim.create (longurl))}};
return (tcp.httpreadurl ("http:/bit.ly/api?url=" + string.urlencode (longUrl)))};
bundle { //test code
clipboard.putvalue (create ("http://flickr.com/photos/scriptingnews/2656400906/"))}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.