Board Thread:Support Requests - Getting Technical/@comment-961279-20161113063046/@comment-961279-20161113151250

Actually, it is worth it and when I've written things like this in the past on wikis, I do document it so that others can maintain it. Maybe not the actual calculations, but at least what format the data has to be in. I can switch to providing full documentation if needed.

What this specifically is for is episodes of The Simpsons. Each page for an episode has a link to the previous and next episodes. I managed to automate some of the navigation by creating two templates. One converts the episode name to a number and the other converts the episode number back to the name. Referencing BASEPAGENAME to detect the page's name gets the ball rolling and simple math calculates the link for the previous and next links.

Then there are 28 other templates that list the episodes per season at the bottom of the page. Those are manually created.

When we find out the title of a new episode, there's three places it has to be added. This is a lot better than it used to be five years ago. It was a mess of manually-created templates (110 of them), and sometimes the links inside those templates didn't match up because people were forgetting to update the same link in multiple templates.

There have been 604 episodes so far and one of the people involved in the show says he'd like to see it reach season 30, so that's at least 44 more episodes we have to work with. We're on season 28 now, but we don't have all of the episode titles for this season yet.

If I can get the episode data into a database or something close to it such as an array, that makes it possible to do further automation of the navigation. I didn't realize that the Loops extension wouldn't be available, so my brute-force method of weeding through the arrays to do a search wouldn't work.

It sounds like Lua is more suitable for what I need, so I can look into that.