Manual:DumpTextPass.php/ja

MediaWiki バージョン:
1.6
Category:MediaWiki code/ja#DumpTextPass.php

詳細

dumpTextPass.php file is a maintenance script that postprocesses XML dumps from dumpBackup.php to add page text which was stubbed out (using --stub).

オプション/引数

オプション説明必須かどうか
--stub To load a compressed stub dump instead of stdin. Input format is <type>:<file>. 省略可能
--prefetch Use a prior dump file as a text source, to save pressure on the database.
Input format is <type>:<file>.
省略可能
--maxtime Write out checkpoint file after this many minutes (writing out complete page, closing xml file properly, and opening new one with header). This option requires the checkpointfile option.
Number of minutes should be passed as value for this option.
省略可能
--checkpointfile Use this string for checkpoint filenames, substituting first pageid written for the first %s (required) and the last pageid written for the second %s if it exists. 省略可能
--quietDon't dump status reports to stderr.省略可能
--reportReport position and speed after every n pages processed.省略可能
--serverForce reading from MySQL server h省略可能
--fullDump all revisions of every page省略可能
--currentBase ETA on number of pages in database instead of all revisions省略可能
--spawnSpawn a subprocess for loading text records省略可能
--buffersizeBuffer size in bytes to use for reading the stub. (Default: 512KB, Minimum: 4KB)省略可能
--helpヘルプ メッセージを表示省略可能

使用法

php maintenance/run.php dumpTextPass [ --stub| --prefetch| --maxtime| --checkpointfile| --quiet| --report| --server| --full| --current| --spawn| --buffersize| --help ]
MediaWiki バージョン 1.39.12 以前では、メンテナンス スクリプトを php maintenance/run.php scriptName ではなく php maintenance/scriptName.php を使用して実行する必要があります。

First generate the dump through dumpBackup.php.

Terminal
dump.xml
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
  <siteinfo>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>1</id>
      <timestamp>2021-10-26T00:25:37Z</timestamp>
      <contributor>
        <username>MediaWiki default</username>
        <id>2</id>
      </contributor>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" location="tt:1" id="1" />
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
    <revision>
      <id>118</id>
      <parentid>1</parentid>
      <timestamp>2021-10-26T12:23:48Z</timestamp>
      <contributor>
        <username>Jay</username>
        <id>1</id>
      </contributor>
      <minor/>
      <comment>Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite))</comment>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" location="tt:1" id="1" />
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
  </page>
</mediawiki>

Now add the text through this script.

Terminal
dumpWithText.xml
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
  <siteinfo>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>1</id>
      <timestamp>2021-10-26T00:25:37Z</timestamp>
      <contributor>
        <username>MediaWiki default</username>
        <id>2</id>
      </contributor>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" xml:space="preserve">&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]</text>
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
    <revision>
      <id>118</id>
      <parentid>1</parentid>
      <timestamp>2021-10-26T12:23:48Z</timestamp>
      <contributor>
        <username>Jay</username>
        <id>1</id>
      </contributor>
      <minor />
      <comment>Protected &quot;[[Main Page]]&quot; ([Edit=Allow only administrators] (indefinite))</comment>
      <origin>1</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="755" sha1="22vz5zlxa2zctewimaum2bf1due8hkl" xml:space="preserve">&lt;strong&gt;MediaWiki has been installed.&lt;/strong&gt;

Consult the [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] for information on using the wiki software.

== Getting started ==
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ MediaWiki release mailing list]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn how to combat spam on your wiki]</text>
      <sha1>22vz5zlxa2zctewimaum2bf1due8hkl</sha1>
    </revision>
  </page>
</mediawiki>

関連項目

Category:Maintenance scripts/ja#DumpTextPass.php Category:Content maintenance scripts/ja
Category:Content maintenance scripts/ja Category:Maintenance scripts/ja Category:MediaWiki code/ja