trappedinspacetime / wikiteam

Automatically exported from code.google.com/p/wikiteam
0 stars 0 forks source link

dumpgenerator.py should save detailed siteinfo #97

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
For wikis with API, we need to save https://www.mediawiki.org/wiki/Siteinfo 
data (1.8+), as rightly reminded by Thingles 
(<https://groups.google.com/d/msg/wikiteam-discuss/muaIxbLElDM/9nEH6P6lA_MJ>). 
It's available since the very first releases with api.php 
(<https://www.mediawiki.org/wiki/MediaWiki_1.8#MediaWiki_1.8.1>), so we can fix 
issue 48 at the same time.

A real must are interwikimap (1.11+), namespacealiases (1.13), skins (1.18+) 
and extensions (includes revisions as of 1.23+); nice to have (mostly 
duplicates of stuff we already save) are specialpagealiases, namespaces, 
magicwords, general, rightsinfo, statistics.

I consider higher priority those available in older releases and those needed 
to parse links or wikitext in general. However bytes are cheap and unrecognised 
parameters just add a warning, so we can ask everything and avoid worrying.
Example from 
<http://www.veikkos-archiv.com/api.php?action=query&meta=siteinfo&siprop=interwi
kimap|namespacealiases|skins|extensions|specialpagealiases|namespaces|magicwords
|general|rightsinfo|statistics>:
<api>
  <warnings>
    <siteinfo xml:space="preserve">Unrecognized value for parameter 'siprop': skins</siteinfo>
  </warnings>

Original issue reported on code.google.com by nemow...@gmail.com on 2 Feb 2014 at 7:42

GoogleCodeExporter commented 8 years ago

Original comment by nemow...@gmail.com on 2 Feb 2014 at 7:43

GoogleCodeExporter commented 8 years ago
namespaces is supported in 1.9, I suppose 1.8 too if docs are not wrong. 
http://www.xdmf.org/api.php?action=query&meta=siteinfo&siprop=namespaces&maxlag=
5

Original comment by nemow...@gmail.com on 27 Feb 2014 at 1:14

GoogleCodeExporter commented 8 years ago
Ah! But fails badly in earlier versions, e.g. 
<http://www.sci-mate.org/wiki/api.php?action=query&meta=siteinfo&siprop=interwik
imap|namespacealiases|skins|extensions|specialpagealiases|namespaces|magicwords|
general|rightsinfo|statistics>:   <error code="siunknown_siprop" 
info="Unrecognised values for parameter 'siprop'">

Original comment by nemow...@gmail.com on 27 Feb 2014 at 1:34