Last modified: 2014-01-11 16:15:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61883, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59883 - Create maintenance script to import the contents of the Help namespace from MediaWiki.org or another wiki
Create maintenance script to import the contents of the Help namespace from M...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.23.0
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-09 21:00 UTC by Nathan Larson
Modified: 2014-01-11 16:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nathan Larson 2014-01-09 21:00:49 UTC
A lot of wikis leave the Help namespace empty because no one with sysop rights gets around to exporting the Help namespace from, e.g., MediaWiki.org and importing it to the local wiki. It's a multi-step process requiring several trips to Special:AllPages, Special:Export, and Special:Import on the two wikis since there are a few thousand help pages, for those who want everything. Maybe one will only want to get pages in [[mw:Category:Help]] and possibly [[mw:Category:Extension help]], though. See [[mw:Project:PD help/export]]

Another possibility might be for a wiki to get rid of its Help namespace and create a help: interwiki prefix pointing to MediaWiki.org, e.g. https://www.mediawiki.org/wiki/Help:$1 Then they give up the ability to create customized help pages, though.
Comment 1 Nathan Larson 2014-01-09 21:35:50 UTC
The other disadvantage of the interwiki prefix idea is that it sends the user off-wiki. Anyway, those wanting to export everything from Category:Help can use: https://www.mediawiki.org/w/index.php?title=Special:Export&addcat&catname=Help&action=submit
Comment 2 Nathan Larson 2014-01-11 15:55:32 UTC
I just noticed, another issue is that not all the pages in the Help: namespace are in the [[mw:Category:Help]], and some pages outside the Help: namespace are in Category:Help.

I would say that it would be best to use: https://www.mediawiki.org/w/index.php?title=Special:Export&addns&nsindex=12&action=submit However, that doesn't work. I suspect that [[mw:Manual:$wgExportFromNamespaces]] is set to false on MediaWiki.org. See bug 59947.

Therefore, there doesn't seem to be any choice but to go to https://www.mediawiki.org/w/index.php?title=Special%3APrefixIndex&namespace=12 or its API equivalent, https://www.mediawiki.org/w/api.php?action=query&list=allpages&apnamespace=12&aplimit=500 and then copy and paste the page titles one obtains from there into the Special:Export text box. That's a pain in the neck, though, because one has to format it properly.
Comment 3 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-11 16:15:40 UTC
You can use the api to generate the export XML used to import it on another wiki. You just need to use a generator module and use the export and exportnowrap parameters.

Example:

https://www.mediawiki.org/w/api.php?action=query&generator=allpages&gapnamespace=12&export&exportnowrap

You'd need to use gaplimit and/or gapcontinue to retrieve all pages. A maintenance script may be useful to take care of this on it's own.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links