Copying templates between wikis

Atlanta, Georgia, USA

There's been a fair bit of discussion at the Tech Conf in the last couple of days about how to share MediaWiki templates between wikis. I usually do this via a list such as the templates page on this wiki, which has a pre-populated link to Special:Export. This is a manual export process, and the resultant file is manually imported into the other wikis where the templates are wanted.

This works fine, but I could make it easier. For example, it'd be nice if the process was automatic.

I also have a little script called mwcli, which I've been slowly adding features to this year. One of them is the ability to upload text files to a wiki, including with live-watching for file changes. I need to add a thing for downloading a set of pages. This would mean that it'd be easy to pull a bunch of templates and modules, work on them locally, and push them up to multiple wikis — all from the local machine, and for users who aren't admins. (Maybe that last point is a un-feature, I don't know.)

Another missing piece of this puzzle is how to define the groups of pages/templates/modules. I think an on-wiki JSON manifest page would be good, but probably I'll just use a local flat text list for now.

Comments on this blog post+ Add a comment
No comments yet
Retrieved from ‘https://samwilson.id.au/index.php?title=Copying_templates_between_wikis&oldid=2781