Tuesday, February 8, 2005

Handling super long URL's

In a previous blog I used tinyurl.com to hide a super long URL that pointed to a Google groups discussion. I had received this link in an email, here is what it looked like in my email:



http://groups-beta.google.com/group/comp.databases.ms-access/browse_frm/

thread/5e2d69c22ffc8098/bbedf0178c3cdef0?q=xml+%22ms+access%22&_done=%2F

groups%3Fas_q%3Dxml%26num%3D10%26scoring%3Dr%26hl%3Den%26ie%3DUTF-8%26as

_epq%3Dms+access%26as_oq%3D%26as_eq%3D%26as_ugroup%3D%26as_usubject%3D%2

6as_uauthors%3D%26lr%3Dlang_en%26as_drrb%3Dq%26as_qdr%3Dm6%26as_mind%3D1

%26as_minm%3D1%26as_miny%3D1981%26as_maxd%3D7%26as_maxm%3D2%26as_maxy%3D

2005%26safe%3Doff%26&_doneTitle=Back+to+Search&&d#bbedf0178c3cdef0



Originaly I copied the link into a text editor, removed the line breaks and pasted it back into Firefox to view. Being Mr. Anal I figured there had to be a better way.


I figured that you could change the text when it was on the clipboard so I searched for a clipboard handler and found a freeware one by Way Out There Software called Clippy (no relation to MS Office I presume). This tray based applet will allow you to alter the contents of the clipboard. I installed the 1.3.0 beta version, however it did not handle my problem out of the box. The program uses 'clippers' to define what it will do to the clipboard text. Clippers are a named set of predefined operations that you can perform. To solve the long URL with line breaks problem, I created a new clipper called Crunch URL and added the following operations:

  • Remove line breaks
  • Search and replace (Search , Replace )
Where means to press the space bar once when presented with the Search entry screen and means to just press the OK button on the Replace entry screen.


Once you have clippy installed and configured you should be able to copy the long URL above and then right click the clippy tray icon, select Crunch URL and then paste it into your browser's address line and see the google groups entry.

1 comment: