On Wed, Jul 24, 2013 at 08:59:25PM +0200, dan entous wrote:
Mapping
a mapping is a json that maps a metadata set to a mediawiki template. we’re currently storing those as Content in the namespace GWToolset. an entry might be in GWToolset:Metadata_Mappings/Dan-nl/Rijkmuseum.
- does that namespace make sense?
a. if not, what namespace would you recommend?
I'd say that the example you gave should give a better hint about what the namespace should be called: Metadata mapping. /wiki/Metadata_mapping:Rijkmuseum makes a lot more sense from a resource/ subresource perspective, since "Metadata mappings" wouldn't be a resource on its own, just a parent directory for other resources. And per-user directories probably wouldn't make much sense, IMO.
mediawiki template parameters
the application needs to know what mediawiki template parameters exist and are available to use for mapping media file metadata to the mediawiki templates. for the moment we are hard-coding these parameters in a db table and sometimes in the code. this is not ideal. i have briefly seen TemplateData, but haven’t had enough time to see if it would address our needs.
- is there a way to programatically discover the available parameters for
a mediawiki template?
TemplateData is, in fact, exactly what you need for that.