On Wed, Jul 24, 2013 at 9:45 PM, Mark Holmquist <mtraceur(a)member.fsf.org> wrote:
thanks for the reply Mark.
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.
1. 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.
the mappings will serve a specific purpose. they will map potentially
unique XML metadata formats and standard XML metadata formats to
mediawiki template parameters. would the namespace Metadata_mappings,
i prefer plural because there will be many mappings, be too generic or
would that suffice for everyone?
i still believe that the use of the user name is important. two or
more people could come up with their own version of how to map
Rijksmuseum metadata with mediawiki template parameters, so if we
continue with this namespacing concept the potential title would be :
Metadata_mappings:Dan-nl/Rijksmusem.
one thing i forgot to mention was the addition of an extension to the
title to help identify the format of the content of the title. we were
planning to use .json, so the end title would be :
Metadata_mappings:Dan-nl/Rijksmusem.json. would that make sense to
everyone?
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.
1. is there a way to programatically discover the available parameters for
a mediawiki template?
TemplateData is, in fact, exactly what you need for that.
i took a look at the current implementation of TemplateData on commons
and have not seen it used for the templates we're currently looking
at. for now i will look into coding the use of the TemplateData if
present and if not, fallback to our current db look-up implementation.
http://commons.wikimedia.org/w/api.php?action=templatedata&titles=Templ…
http://commons.wikimedia.org/w/api.php?action=templatedata&titles=Templ…
http://commons.wikimedia.org/w/api.php?action=templatedata&titles=Templ…
http://commons.wikimedia.org/w/api.php?action=templatedata&titles=Templ…
http://commons.wikimedia.org/w/api.php?action=templatedata&titles=Templ…
--
Mark Holmquist
Software Engineer, Multimedia
Wikimedia Foundation
mtraceur(a)member.fsf.org
https://wikimediafoundation.org/wiki/User:MHolmquist
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l