$this->buffer .= wfElement($this->openElement[0], $this->openElement[1], $style); $this->openElement = false; } } } $dumper = new TextPassDumper($argv); if (true) { $dumper->dump(); } else { $dumper->progress(<<<END This script postprocesses XML dumps from dumpBackup.php to add page text which was stubbed out (using --stub). XML input is accepted on stdin. XML output is sent to stdout; progress reports are sent to stderr. Usage: php dumpTextPass.php [<options>] Options: --stub=<type>:<file> To load a compressed stub dump instead of stdin --prefetch=<type>:<file> Use a prior dump file as a text source, to save pressure on the database. (Requires PHP 5.0+ and the XMLReader PECL extension) --quiet Don't dump status reports to stderr. --report=n Report position and speed after every n pages processed. (Default: 100) --server=h Force reading from MySQL server h --current Base ETA on number of pages in database instead of all revisions --spawn Spawn a subprocess for loading text records END ); }
return $normalized; } } $dumper = new TextPassDumper($argv); if (!isset($options['help'])) { $dumper->dump(WikiExporter::FULL); } else { $dumper->progress(<<<ENDS This script postprocesses XML dumps from dumpBackup.php to add page text which was stubbed out (using --stub). XML input is accepted on stdin. XML output is sent to stdout; progress reports are sent to stderr. Usage: php dumpTextPass.php [<options>] Options: --stub=<type>:<file> To load a compressed stub dump instead of stdin --prefetch=<type>:<file> Use a prior dump file as a text source, to save \t\t\t pressure on the database. --quiet\t Don't dump status reports to stderr. --report=n Report position and speed after every n pages processed. \t\t\t (Default: 100) --server=h Force reading from MySQL server h --output=<type>:<file> Write to a file instead of stdout <type>s: file, gzip, bzip2, 7zip --current\t Base ETA on number of pages in database instead of all revisions --spawn\t Spawn a subprocess for loading text records --help Display this help message ENDS ); }
} else { $dumper->progress(<<<ENDS This script postprocesses XML dumps from dumpBackup.php to add page text which was stubbed out (using --stub). XML input is accepted on stdin. XML output is sent to stdout; progress reports are sent to stderr. Usage: php dumpTextPass.php [<options>] Options: --stub=<type>:<file> To load a compressed stub dump instead of stdin --prefetch=<type>:<file> Use a prior dump file as a text source, to save \t\t\t pressure on the database. \t\t\t (Requires the XMLReader extension) --maxtime=<minutes> Write out checkpoint file after this many minutes (writing \t out complete page, closing xml file properly, and opening new one \t with header). This option requires the checkpointfile option. --checkpointfile=<filenamepattern> Use this string for checkpoint filenames, \t\t substituting first pageid written for the first %s (required) and the last pageid written for the second %s if it exists. --quiet\t Don't dump status reports to stderr. --report=n Report position and speed after every n pages processed. \t\t\t (Default: 100) --server=h Force reading from MySQL server h --current\t Base ETA on number of pages in database instead of all revisions --spawn\t Spawn a subprocess for loading text records --buffersize=<size> Buffer size in bytes to use for reading the stub. (Default: 512KB, Minimum: 4KB) --help Display this help message ENDS ); }