Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Create a tri.im URL shortening Service' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Create a tri.im URL shortening Service
Authored by: elldove on Sep 18, '09 04:07:11PM

The ruby script is a simpler and more elegant solution than my hacky applescript, not to mention browser independent.

However, I was going for a service which can work with links, not just urls. The idea being that, for example, you're on the NYTimes front page and see an article you want to tr.im. With the ruby script you have to open the webpage first, then go the location bar, select the URL, right click and use the tr.im service.

With the applescript you can just right click on the link to the article and use the tr.im service.
Can ruby script work with ? That would be ideal...

Admittedly it does this in a hacky way, using javacript to compare every link's URL on in a page's source to every link's title until it finds the match. The real issue here is that Automator's service creation is limited to accepting as input text, urls, addresses, files, etc. But there's no way to input an html link and get the url out of that.

The limitation to Safari is unforunate, but Firefox and Chrome (being written in Carbon) can't work with any services, so the point is mute. I guess Camino users are out of luck. I will update the script to work with both NetNewsWire and Safari and post that.



[ Reply to This | # ]