The Signpost

From the editor

A piccy iz worth OVAR 9000!!!11oneone! wordz ^_^

Contribute  —  
Share this

There are some unique challenges in working with a content management system consisting of nineteen years of HTML, CSS, MediaWiki markup, Lua, two separate JavaScript user scripts, Python, and the specific template ecosystem of the English Wikipedia running a backend and a frontend on top of another backend and frontend. It is less of a "tech stack" and more of a "tech pile". Nevertheless, some progress has been made on the suite (SPS.js, SignpostTagger, Module:Signpost, Wegweiser, and the various internal Signpost templates). Most recently, two new features have been integrated into the pile: subheadings and images in the database.

The subheadings were particularly difficult. The primary issue is that they weren't saved anywhere: they were used in templates on the main page, at Wikipedia:Wikipedia Signpost, and then erased when the next issue was published. Which means that, well, they were saved somewhere. But the only way to get them out was to go through the entire history of the main Signpost page, manually identify each revision that was associated with a specific issue, and then manually copy the text of the subheading from each item into the templates on that issue's archive page. Well, not entirely manually: I wrote a script to do the last part. Then I put together a second script to extract those subheadings out of the issue pages and add them to the RSS description templates in the actual article pages.

But then, once they were in the RSS description templates, it was simple to add some code to the existing metadata fetcher script to incorporate the subheadings into the data it passed to the Lua serializer − and similarly simple to incorporate subhead parsing/formatting into the publishing script, SignpostTagger, the module's own output, and the snippet display templates.

Well, for arbitrary definitions of "simple". The long and short of it is that I was able to recover all of the previously-lost subheadings for every Signpost article going back to July 2012 when subheadings were first used. It's also now possible to use the module to make dynamic article lists, now that the database contains the full set of information associated with an article, rather than the previous system of hardcoding everything into individual issue pages (yeesh!).

Some more work will be necessary to fully modernize various things — archive pages, for example, still use the weird redundant {{Signpost/item}} instead of {{Signpost/snippet}}, the module doesn't yet have the ability to fetch images, and CSS cropping for cover items has some bizarre mobile bugs that need to be worked out. By the time the next issue is out, I expect to have these resolved, as well as some miscellaneous other things.

There was also some pretty interesting stuff squirreled away in those old revisions, which I will go into further depth on in this issue's Apocrypha − for now, suffice it to say that, in the language of the old country, "we nao haz t3h piccys ^____^" [sic].

In this issue
+ Add a comment

Discuss this story


The Signpost · written by many · served by Sinepost V0.9 · 🄯 CC-BY-SA 4.0