Wednesday, January 11, 2017 In Pursuit of Paper Friendly URLs

But Why?

Recall that my paper based TODO list had two challenges to overcome. First, I needed a backup/archiving mechanism, second I needed an easy bridge from the paper to the digital world.

The former issue, backups, was easy solved: every morning I splay out the various index cards I'm tracking tasks on (with each card representing a single project) and snap a photo of them. If I lose, or corrupt any of the cards (read: spill tea all over them), I've got a photo I can use to recover my lost work.

The latter issue I solved by use of a jerry-rigged URL shortner. Essentially, I can turn any entity associated with a URL (an e-mail message, bug report, Google Doc) into a 3 letter code. I've found that even with my crappy handwriting I can manage to neatly print 3 characters.

Here's a card for a hypothetical Project X:

Using the URL Shortner, I can jump to the resource associated with the first task using the code CLW.

This all works, and works surprisingly well.

However, it was nagging at me that my URL Shortner solution depended on a now defunct Google Apps Lab Project. While this works for me now, nothing stops Google from pulling the plug on this project tomorrow and I'd be left hanging. Also, I figured if I was getting benefit from these super short URL codes, maybe other folks would, too.

Introducing 3Shrink

I therefore give you: 3shrink is yet another URL Shortner, but unlike others out there, it focuses on making extra short, text friendly URLs. (OK, it does feel a bit like 7 minute abs, but bear with me here.) I quickly coded 3shrink, and you're welcome to grab the source code here to play with it. Or, just head over to to give it a try.

To make 3shrink truly useful I need to implement a corresponding bookmarklet and protocol handler. Stay tuned for those bits of code, but for now 3shrink does have some value.

For one thing, you can control the namespace associated with your 3 digit codes by changing the URL. The above codes, CLW, DEY and L48 were created in the instance. So visiting takes you to a valid link, whereas visiting will most likely give you a 404 page. You can even point (CNAME) your own domain, say, to the 3shrink server, and it will use that as the corresponding name space. It's all very mailinator like.

And like mailinator, there's effectively no security. There's no obvious way to get a list of all URLs associated with an instance, but if you spent enough time poking at you could figure out all the URLs associated with it. So be smart. You can also use a more difficult to guess submdomain if you want a bit more security.

Throw &geek=1 on any 3shrink URL, and you gain access to a trivial text based API that Tasker, curl and friends can easily plug into. See:

$ little=`curl -G -s \
  --data-urlencode i= -d geek=1 `
$ big=`curl -G -s -d i=$little -d geek=1 `
$ echo $big
$ echo $little

And finally, 3shrink isn't limited to encoding and decoding URLs. It's happy to shrink any text that's 1024 characters or smaller. This lets you turn an address, latitude and longitude or a Tweet into a handy 3 character code. Like the following:


So there you have it, Go and put it to use. Where will your 3 letter URLs take you today?

No comments:

Post a Comment


Related Posts with Thumbnails