Manual:DumpTextPass.php/pl

This page is a translated version of the page Manual:DumpTextPass.php and the translation is 4% complete.
Wersja MediaWiki:
1.6

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

Options/Arguments

Option Description Required
--stub To load a compressed stub dump instead of stdin. Input format is <type>:<file>. Optional
--prefetch Use a prior dump file as a text source, to save pressure on the database.
Input format is <type>:<file>.
Optional
--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.
Optional
--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. Optional
--quiet Don't dump status reports to stderr. Optional
--report Report position and speed after every n pages processed. Optional
--server Force reading from MySQL server h Optional
--full Dump all revisions of every page Optional
--current Base ETA on number of pages in database instead of all revisions Optional
--spawn Spawn a subprocess for loading text records Optional
--buffersize Buffer size in bytes to use for reading the stub. (Default: 512KB, Minimum: 4KB) Optional
--help Display the help message Optional

Usage

php maintenance/dumpTextPass.php [ --stub| --prefetch| --maxtime| --checkpointfile| --quiet| --report| --server| --full| --current| --spawn| --buffersize| --help ]

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>

Zobacz też