Easy-to-remember names!
Ever wanted to share your instructable with someone offline? Its hard to remember those random ID's at the end of the URL, isn't it?
HAVE NO FEAR, I AM HERE!
(Note, you can be afraid of me, if you'd like)
Anyway, on to the point.
Biobattery!
Look at the URL! Its all nice-looking! And what do you know, I added the Allsteps link in for you!
You probably want this for yourself, dontcha? Don't worry! Just type this in the URL of your favorite browser!
http://instructables.thruhere.net/id/add/name/YOUR_DESIRED_SLUG/id/INSTRUCTABLE_ID
The "slug" is the thing that goes on the end of the URL, in the above case, it was "biobattery". It can be numbers or letters, but it is case-sensitive!
The instructable ID should be JUST that random string. No slashes, no ?ALLSTEPS, just the random letters/numbers.
Please, please don't abuse this, please. If I find that someones been taking up multiple slugs for an instructable, or not linking to an instructable, you're going to be sorry ;-)
All of you who say I should being doing something else, this was done in less than fifteen lines of python! Thats why theres no nice page to create those links, because I'd have to spend 10 minutes making it. I actually spent more time on this post than getting it to work!
And if anyone wants to donate a nicer domain, just ping the above domain to get my IP, and let us know ;-)
PS: If you hate "instructables.thruhere.net", you can use "ytm.ath.cx", if you can remember it! Its pointed at the same server.
Comments
13 years ago
So, when are you coming to intern at Instructables?
Reply 13 years ago
I could come down for a week right now if you wanted!
Reply 13 years ago
School first! ;D We'll talk.
Reply 13 years ago
Well, I think it could kinda-sorta-maybe-stretchit be almost school... I'd learn better things at least...
Fine... :P
13 years ago
Oh, a quick question, how do you guys define "featured"? If its by HTTP referrer, I don't want to make it so that whenever someone hits one of these links it becomes featured.
Reply 13 years ago
The featured setting is in the database. Your system is fine.
13 years ago
I love stuff like this. This is something I've wanted for a while. Human-readable URLs are so good for so many reasons. We've just had too many other things ahead of it in the pipeline. Now that Rachel isn't sleeping though...
Reply 13 years ago
What languages do you have on your server? I know this is done in Java, of which I have limited knowledge of making web sites from. I did this in Python, but I could redo it in something else, like PHP, if need be.
13 years ago
By the way, if its not working, sorry. This is a server thats running in our basement, and right now we're having some internet issues.
13 years ago
Wow, this is cool. I assume you got appropriate permissions? :P
Reply 13 years ago
. What is he doing that he would he need permission for? . As far as I can tell, he is using his own server. Thruhere.net appears to be a dynamic DNS service, so instructables.thruhere.net probably points to his IP. . All he is doing is redirecting. His server takes the "legible" URL, looks up the "real" URL, and then sends you on your way (guessing, but would make a small bet I'm right). Check out your address bar when you use it - you still end up at Instrucable's site with that goofy URL. . Using "instructables" in his domain name may be an intellectual property problem, but, even if the Instructables ppl don't like it, I can't imagine them doing much more than sending him a note saying "please stop," which he appears to be eager to do already. . As far as I can tell, the worst thing he can do is log who's IP is looking at which pages. If I use his service, I give him permission to log my access and use the info any way he sees fit (as if he needs it).
Reply 13 years ago
But once I know everyone's IP, I CAN RULE THE WORLD!!!! Or something like that... And yeah, you're exactly right. All it does is look up the DB the name you set, and redirects you to the external one. I'm not doing any extra logging (right now, at least) than what is the default. I know Apache keeps some logs, and I think Django does too...
Reply 13 years ago
. If you don't mind sharing the source code, I'd be curious as to exactly how you did it. I've thought about doing something similar, only with multi sites and without public access. I have a file server that isn't working very hard and would make a great "URL translator." . PS: DynDNS rules (finally figured out they are behind thruhere). Been using them since it was "donation please." I made a small donation (5 or 10$US), and when they went "commercial," they grandfathered me with all but the top-tier services.
Reply 13 years ago
If you want a nice URL parser, look into the Django framework. Its in python, so you'll have to learn another language, but its worth it. You know how everyone loves Ruby On Rails? Its like that, except everyone whos tried both likes Django better :P
models.py:
views.py
These were an app called "ibles", and I didn't make a separate urls.py just for it; so my urls.py looked like this. If you called it foo, just replace ibles with foo:
urls.py
All you need to know to understand this is that models.py defines the database, and that views.py defines how the pages render.
Reply 13 years ago
That was my exact thought after posting that :P
Reply 13 years ago
Permissions... uhh....
(I know!)
Well, its always better to beg for forgiveness than to ask for permission..?
If any instructablonians come by, you guys don't mind, right?
13 years ago
Awesome! I got it to work and added my first instructable. But I'm not sharing the link yet, because I want my first instructable to be pristine, and perfect, so I don't need to add one of those dumb "Please be nice!" things.
13 years ago
First the allsteps and then this.
I tried it with http://instructables.thruhere.net/id/twilightzone and it worked great.
13 years ago
Or you could just use tinyurl?
L
Reply 13 years ago
You still have a bizzare ID string to deal with. Its smaller, but still random.
13 years ago
Why not iBle'ise it?
Reply 13 years ago
I will when I get time, maybe in a week or so ;-) This is very-betaish. I'm defiantly going to work on it, its just in an early stage. If anyone wants to donate, a domain of your choosing would be nice. (You can get 'em for $2 at yahoo!)
Reply 13 years ago
Why not just get yourself a .tk address for free?
Reply 13 years ago
2 reasons: .tk is forwarding. .tk's are add ridden. With the forwarding, the .tk banner will stay with you even once you go to instructables. The second is obvious... :P I find them a pain in general. I'll stick to this if you don't mind :P
Reply 13 years ago
I used to have that problem, until i installed ABP to block the banner (The frame still showed though) and blocked JS from it to stop the popup.
Reply 13 years ago
Only worked on a personal scale, mind.
Reply 13 years ago
Yeah... I don't like ABP. And yeah, not everyone has it.
13 years ago
Nah it shouldn't be a problem I ~~hope~~ think... By the way, your example link stopped working at my end. ( The URL is still the letters and numbers, nothing else)
Reply 13 years ago
Sorry, I was playing around to make it easy to "Moderate" on my end. Should be fine now.