Am 29.04.2008 um 02:47 schrieb Brianna Laugher:
2008/4/29 Johannes Beigel
Given that any MW install can set up their licenses however they wish,
And wouldn't it be worthwhile to provide a way to let them do this in
some standard way?
I don't see how the API will be able to extract
such information - it
would be like asking for the API to be able to extract a user's native
language from their user page. Free-form wiki content and all.
Not really: There are gazillions of user pages and every user can put
anything on her user page. But the whole wiki has been set up by some
administrator or even organization and normally it's in the interest
of the operator to provide information regarding the whole wiki
That definitely looks like cool stuff. Already the two example queries
yield information that would be really helpful for us: The information
contains full license names together with URLs to the full license text.
What's the timeframe for Commons API? Will this be available as an
extension to the MediaWiki API on Wikimedia Commons in near future?
(As the integration of our wiki-to-print stuff in MediaWiki is already
a long haul, we'd like to proceed as quickly as possible.)
Is the code used to extract this information Open Source? If it's not,
could you or Magnus elaborate on how you extract this information? Do
you parse the wikitext of the Image:Foo.ext pages? As I mentioned, the
one thing we need for the image files is the correct name of the
license (and ideally get the license text for it, but see next
question). For example: If there's a license template "GFDL-self" is
it safe (for all languages) to assume that the part before the "-" is
a well-known (at least for Wikimedia Commons) abbreviation of the
Does this page:
contain all the licenses that can occur for image files on Wikimedia
Commons? This subpage:
looks like it's just Python code with a hardcoded dictionary mapping
license names to URLs. As long as Commons API or s.th. like it is not
readily available, I think we have to resort to such a approach.