GSoC/GCI Archive
Google Code-in 2013 Wikimedia

Rewrite Template:Countdown in Lua

completed by: Theo Patt

mentors: Quim Gil, Liangent

MediaWiki templates  are wiki pages to be included in other pages. Templates can take arguments, allowing editors to create special types of content like infoboxes, banners, and more. Originally, templates were written wikitext with parser functions, mimicking the functionality of a very basic programming language (but requiring advanced skills to get smart results out of them).

This problem has been solved allowing templates to rely in modules written with Lua, a proper programming language. Now we have many wikitext templates waiting to be rewritten in Lua. Take one and rewrite it!

Template:Countdown


This page documents the output. Your template based in Lua should be able to run the same tests providing the same results. Click "Edit source" to see the actual wikitext code. Looks complicated on first sight, but the underlying structure is fairly simple. No subtemplates. There is also a bare-bones implementation in Module:Arbcom election banner that you can crib from.

Create a template at https://en.wikipedia.org/wiki/Template:Countdown-Lua 

Create a module at https://en.wikipedia.org/wiki/Module:Sandbox/Countdown

Please report your progress soon and often at

Bug 58135 - Rewrite Template:Countdown in Lua

where not only GCI mentors but also other community contributors can follow the progress and help.

See also:

https://en.wikipedia.org/wiki/Wikipedia:Lua/Help

https://en.wikipedia.org/wiki/Help:Lua_for_beginners