Content, Forever

Behind the Scenes

by Darius Kazemi

Dec 17, 2014

On Dec 16 I released a little project called Content, Forever. It generates a meandering essay from a seed topic by crawling Wikipedia, bouncing around from article to article with a short attention span.

How it Works

It works, loosely, like so:

  1. Go to the Wikipedia article for the seed topic.
  2. Get the first 5 paragraphs that contain a link to another WP article.
  3. Grab a random paragraph from those 5, then grab a random link from that paragraph.
  4. Print out the sentence we got the link from, then go to the linked article.
  5. If there are images on the page, there's a 20% chance we grab an image at random along with its caption and print that out too.
  6. (If we hit a snag anywhere in this process, grab a random link from anywhere in the article and print that sentence then go to that article.)
  7. Start over at step 2. Stop if we hit our content limit.

Drafts (Process Notes)

I thought it might be fun for people to see all the draft stages of the project. I wrote most of this in JSFiddle, an online tool that lets you write JS/HTML/CSS and test it very quickly, then save out drafts and share them with people. A nice side effect is that all my drafts are saved this way.

Here are a few notable drafts. All of these you need to manually reload to see new content.