The Importer's Guide
Welcome to The Importer's Guide, a tutorial on how to make good use of the importer
user group on the English Wikibooks. This covers how to perform transwiki importations and history merges.
How to import a page from another WMF wiki
[edit | edit source]You can import pages from certain WMF wikis (English Wikipedia, English Wikisource, English Wikiquote, English Wikiversity, English Wiktionary, English Wikinews, Meta-Wiki, Simple English Wikibooks, Wikispecies, Multilingual Wikisource, and Wikimedia Commons) directly to the English Wikibooks through a process known as transwiki import. If you are an administrator or import uploader, you can XML import, allowing you to import from any MediaWiki installation (not even just WMF projects), however, this guide does not cover that procedure.
To import a page, you should use Special:Import (See right).
The first field on this page is "Source wiki", which allows you to select the wiki from which you are importing. By default, the list uses the interwiki prefixes, rather than the names of the projects (e.g. "s" instead of "English Wikisource). You may wish to install the prettyImport user script, which fixes this in the dropdown menu.
The second field is the title of the page. If you have prettyImport enabled, you can have this field autopopulated using the ?page=
parameter in the URL. For instance: https://en.wikibooks.org/wiki/Special:Import?page=User:JJPMaster
fills in the field with "User:JJPMaster".
Next, there are three checkboxes: "Include all revisions (revision dates and editors' names will be preserved", "Include all templates and transcluded pages", and "Assign edits to local users where the named user exists locally". Here is some guidance as to when to use them:
- "Include all revisions" should almost always be checked, unless you need to import only the last revision for some reason. Having it disabled is likely to lead to problems involving attribution.
- "Include all templates" should usually not be checked, and should virtually never be enabled if you're importing into any namespace other than Transwiki. One legitimate use of this checkbox is "cascading importation", which will be described later in this book.
- You have discretion regarding whether or not you should enable "Assign edits to local users" (only if you're using transwiki import; otherwise, never check it) since Wikibooks has Single-User Login, meaning that accounts on individual Wikimedia projects are shared across all of them (see Special:CentralAuth). Please note that doing this will automatically create Wikibooks accounts if they do not exist locally, and will add contributions to those accounts that do. The author of this book generally leaves this box unchecked.
Below that is a field that includes your reason for importing. It is generally advised that you leave a descriptive summary here.
Finally, there are three radio buttons: "Import to original namespace", "Import to a namespace", and "Import as subpages of the following page". Due to a bug, only "Import to a namespace" works, so generally leave this one alone.
Cascading importation
[edit | edit source]Occasionally, you may have to import large numbers of pages at once. If you need to do this, a technique that may be useful is cascading importation.
Be very careful when using this tool. If you use it wrong, it could overwrite potentially hundreds of pages and be very difficult to reverse. Please follow the instructions exactly as described:
- Create a page on the wiki from which you are importing whose title is
User:<your username>/CascadingImportation
. - On that page, add the following content:
{{#invoke:Lockbox|lock|<page1>|<page2>|<page3>|...}}
where page1, page2, page3, etc. are the titles of the pages you're importing. Do not include the "..."; that was just an illustration of how you can import a potentially infinite number of pages with this tool. - Go to Special:Import and fill in the fields as follows:
- Source wiki: The wiki you're importing from
- Source page:
User:<your username>/CascadingImportation
- Include all revisions: Checked
- Include all templates: Checked
- Assign edits to local users: Not checked
- Comment:
Mass-importing pages: <reason>
- Import to a namespace:
Transwiki
Make ABSOLUTELY SURE that the namespace to which you're importing is Transwiki. Otherwise, you are likely to permanently alter the history of already existing pages.
If you want to automate this, you can install User:JJPMaster/cascadingImport.js and click the "Cascading import" link in the upper-right-hand corner of the page. Note that doing this will also automatically install prettyImport, which will display an "Are you sure?" dialog before you press the "Import" button.