Help:Import/ja
注意: このページを編集すると、編集内容が CC0 のもとで公開されることに同意したと見なされます。詳細はパブリック・ドメインのヘルプ ページを参照してください。 |
Import refers to the process of bringing pages from one wiki into another.
Importing pages can be a power-tool that can easily do unexpected and dangerous things to your wiki. Only import content this way if you know what you are doing.
There are two kinds of import, both of which are accessible via the Special:Import page, the Transwiki and Upload import.
Types of import
Transwiki import
Transwiki import, also known as interwiki import, lets you import pages from one wiki to another.
The settings of the destination wiki decide which source wikis are allowed.
MediaWiki:import-interwiki-text (インポートするウィキとページ名を選択してください。
版の日付と編集者名は保持されます。
他のウィキからのインポートはすべてインポート記録に記録されます。
) might appear during the process.
Transwiki import is equivalent to going to Special:Export on the source wiki, downloading the resulting XML file, and then importing it using XML import, except that you might only have permissions to do one but not the other.
When transwiki importing, the すべてのテンプレートと参照読み込みされたページを含める
option imports all the templates used an imported page.
This is not necessarily all templates the page depends on to run (if you import a template and its dependencies, it does not include any subtemplates unless they happen to be transcluded with the base template page itself). This option can easily import more pages than you intended, should generally only be checked if you really know what you are doing, as it can screw up the wiki in ways that take a lot of effort to undo.
To check if your wiki has Transwiki import sources configured and see which wikis they apply to, you can use the API:
- <wiki url>/w/api.php?action=paraminfo&modules=import
The configuration is specified as: <param name="interwikisource" description="For interwiki imports: wiki to import from"> …
Upload import
See also: Manual:XMLダンプの取り込み
Upload Import, lets you import an XML file generated by exporting pages from another wiki. This displays the message MediaWiki:Importtext (元のウィキで書き出し機能を使用してファイルに書き出してください。 それをデバイスに保存した後、こちらへアップロードしてください。)
To export wiki pages to a file, see Help:書き出し
.
Generally, any user can export pages to a file, but importing them into a wiki requires the importupload
user right.
This is granted to sysops in the default configuration, but on WMF wikis is its own "importer" group.
Unlike with transwiki import, which always preserves content from the source wiki unchanged, nothing stops you from editing the XML file before importing it, allowing backdating of edits, fake usernames, or other ways of rewriting history.
This editing process can be used for:
- Adding a note about the import in the edit summary or as a change tag .
- Changing user names and page names to avoid conflicts.
- Adjusting namespace names to be more generic or suitable
- Rebasing edits, as an alternative to revision deletion of large chunks of history if unacceptable content is added and later removed.
See Manual:XML Import file manipulation in CSharp for an example of handling these XML files using C# in Visual Studio .NET.
Useful applications of importing
- Keeping the page history intact when moving and editing a page in a different wiki. This is particularly helpful if the source page becomes harder to locate due to page moves.
- Preserving the history when a page is moved to another wiki and then deleted from the original wiki.
- Using templates from another wiki.
利用者名
The default behavior
By default, imported edits appear with an interwiki prefix, like meta>Example
.
See an example of an imported history here.
Assigning edits to local users
If you tick the 指定された利用者がこのウィキに存在する場合その利用者に編集を割り当てる
checkbox, then edits will be attributed to the user with no interwiki prefix if such a user exists.
This makes it not easily possible to distinguish between imported edits and edits originally made on the wiki.
Recent changes
Imported edits never show up in recent changes , but the act of performing the import itself does.
Import destinations
By default, imported edits appear in the same namespace and title on the target wiki as they did in the source wiki. The import form allows you to specify the following:
- A namespace to import content to instead (名前空間を指定してインポート:). The namespace option completely ignores the source wiki namespace, so if you import m:Template:Void into Help space it will become Help:Void, not Help:Template:Void.
- A base page to make all imported pages subpages of (以下のページの下位ページとしてインポートする:).