On Tue, Apr 29, 2008 at 11:21 AM, Johannes Beigel
<johannes.beigel(a)brainbot.com> wrote:
Am 29.04.2008 um 02:47 schrieb Brianna Laugher:
However...
<plug>
[Commons API]
</plug>
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.)
It probably won't be on Commons in the near future. It will live on
the toolserver (or the stable toolserver later) for the forseeable
future.
And while it's a work-in-progress, the XML should be more or less
stable, unless some finds a flaw in the structure or new things to
add.
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
license?
* Yes, it's open source (GPL). You can find the code in the MediaWiki
SVN, under tools/commonsapi
* I don't parse the wikitext, but the rendered HTML. For license
detection, I use categories.
* Things like GFDL-self are collapsed into "normal" GFDL, and a
"self-made" tag attribute for <licenses>
Does this page:
http://commons.wikimedia.org/wiki/MediaWiki:Commons_API
contain all the licenses that can occur for image files on Wikimedia
Commons?
No, but it should. I'm a one-man show right now; if you have admin
rights on Commons, *PLEASE* help adding/fixing licenses. I'm swamped
with other things as it is...
This subpage:
http://commons.wikimedia.org/wiki/Commons:API/license
looks like it's just Python code with a hardcoded dictionary mapping
license names to URLs.
This page has nothing to do with my API...
As long as Commons API or s.th. like it is not
readily available, I think we have to resort to such a approach.
It will be available as soon as people help me. Find pages where it
doesn't work to everyone's satisfaction, so I can fix things, and help
by adding licenses to MediaWiki:Commons_API .
Cheers,
Magnus