WikiWak - Yummy slices of Wikipedia, six at a wak!
September 3, 2012 2:46 PM   Subscribe

WikiWak - Yummy slices of Wikipedia, six at a wak!
If you were one of those kids who used to enjoy browsing the encyclopedia for random stuff, this may be of interest. Punch the big blue WAK!, and WikiWak will pop six pages from Wikipedia in separate windows (you gotta allow popups from WikiWak). Unlike Wikipedia's "Random Page" link, WikiWak pulls articles from Wikipedia's "Featured" and "Good" categories. So your liklihood of coming across something interesting to read is quite a bit higher. Why six pages? Well, that appears to be enough for a single sit upon the porcelain pedestal.

Written in Perl, it uses articles gleaned from Wikipedia via their API, requesting lists of article names for the categories "Featured articles" and "Good articles". The article names have their spaces converted to underscores and all their special characters like umlauts are uri_escaped into their %XX form. Then the URLicized article names are prepended with the rest of the URL for English Wikipedia and are written to a big ole text file, which is then uploaded to my web server.

When someone punches WAK!, six URLs are randomly chosen from the big ole text file and HTML containing the requisite javascript to launch the chosen URLs is beamed back to them via the magic of the internet, whereupon their browser dutifully opens six spankin new windows full of Wikipedia wonders.

What do programmers do when they have a holiday with nothing planned? Write goofy webtoys!
Role: Programmer, designer, etc.
posted by gregor-e (2 comments total) 1 user marked this as a favorite

This is pretty great, but it'd be even better if it opened the articles in new tabs, rather than new windows. Or maybe an option for either?
posted by bowbeacon at 2:51 PM on September 3, 2012

Turns out there's no window target in HTML for new tabs, only new windows. You can configure your browser to send all window.opens to new tabs, but almost nobody does.
posted by gregor-e at 2:55 PM on September 3, 2012

« Older Celebrity Synesthetics...   |   Breaking Bad - In Memoriam... Newer »

You are not currently logged in. Log in or create a new account to post comments.