Last modified: 2014-10-19 22:52:11 UTC
EasyTimeline hasn't gotten a lot of maintenance in the last few years, in part perhaps because the perl script and the ploticus dependency make it harder for MW devs to tweak.
Bringing the graphics generation "inside" also could enable fancier future things, such as in-browser visual editing of timelines if it can be translated into something manipulable on the web such as SVG.
Note, we already have limited support for svg (limited because the png and svg output sometimes differ slightly) - http://upload.wikimedia.org/wikipedia/en/timeline/688dde24168b00c8abaea72a41adad6d.svg
Ploticus definitely has to be replaced, unless it will support non-Latin fonts and right-to-left text (See Bug 4030 and Bug 30790). I will probably replace it with Pango-Cairo.
Replacing Perl with PHP is probably a good thing, as much as i love Perl, but it seems like a much bigger thing. I am now refactoring the current Perl code, to understand the EasyTimeline syntax better. After that the translating of Perl to PHP, if anyone will be interested.
... I meant to say: After that the translation of Perl to PHP will be easier, if anyone will be interested.
Well, maybe you can document it on the way?
Is it really useful to reimplement the current syntax? It requires writing a new parser in PHP for (another) non-standard format.
It would probably make sense to not have one extension accept two types of syntax, so I'd propose a new extension and a bot-with-human-review conversion.
We would need to weight the existing corpus. Maybe there is some existing perl2php translator that is able to speed the conversion.
I have pushed a *very* basic initial version to https://github.com/scfc/mediawiki-timelinexml-extension that can transform a most simple example to red and black rectangles linking to Wikipedia.
I don't know MediaWiki's codebase well enough to see whether the problem of producing an SVG file and a corresponding PNG file and mapping has surfaced at another point. It looks as if Aaron had investigated some SVG graph libraries which might be useful (in the end, a timeline is just a fancy horizontal/vertical bar).
FYI, I'm trying to get "modules-as-images" reviewed: https://gerrit.wikimedia.org/r/#/c/113759/ . I think this could replace EasyTimeline easily since it moves the burden to the site users. Scribunto (they shall write). :)