Project:PD help/mirroring

Fske

Mirroring with a bot
There is an experimental script to mirror the English content: mirrorhelp.py. This uses pywikipedia to interface between the wikis. So, assuming you have a local wiki, configured in familes/local_family.py, this could be run like: python mirrorhelp.py -family:local

Currently, this script does the folowing:


 * 1) creates a few local templates (the names make more sense on mediawiki.org than on the local wiki, but what's in a name?)
 * 2) ;PD header: A generic header; lists where the page was copied from and supresses the edit section links.
 * 3) ;Languages: A generic footer; created empty, but can be filled in as desired.
 * 4) ;Meta: used to link to pages on meta.
 * 5) Scans through the Help: namespace, copying pages as it goes.  However, some pages are skipped:
 * 6) *redirects
 * 7) *pages with a / in the name (non-English pages)
 * 8) Parses each help page, and copies any templates and images that are used.
 * 9) *This parse is not recursive; it doesn't copy templates or images used by the templates, to prevent generating too much content.

Safely updating pages
The script adds to each page it imports, and checks it on pages it replaces, as a safety mechanism. It won't overwrite existing pages that are missing this text, to prevent clobbering preexisting pages. This also allows editors to fork that page, simply by removing that category.

The bot will currently refuse to overwrite semi-protected pages, and will not replace existing images. It can be rerun later, to update to newer content.

Limitations
This is an experimental process that copies incomplete content. It isn't perfect or completely automatic. Here are a few known issues:


 * Soft redirects aren't standardized on mediawiki, so the script can't avoid them. There may be a few weird pages because of this.
 * The Admin tip template is broken. Most sites can probably just blank this, so as not to confuse beginners with administrivia (that's a pretty nice feature, IMHO); others may want to manually copy the image and fix the template.

I'd recommend trying this out on a test wiki before using it in production, so you know what to expect before using it in production. You may also want to use a dedicated bot account for this. Although you will get a few red links, you will get a generally useful help namespace.