Nathan TeBlunthuis 72410d090b wikiq: skip parse on subsequent same-size revs after timeout
Per-page adaptive parse skip: once mwparserfromhell times out on a
revision of size N bytes, force-timeout future revisions on the same
page whose text is >= N bytes instead of waiting another 60s on each
one. State resets per page, so well-behaved pages are unaffected.

Motivated by zhwiki bot-vandalism log pages (e.g. ns=4
'Wikipedia:当前的破坏/...' at 4.6GB across 6133 revisions) where every
revision triggers the 60s SIGALRM, blocking the worker for hours.
2026-05-07 21:43:05 +00:00
2025-12-30 11:26:24 -08:00
2025-06-17 11:37:20 -05:00
2025-07-07 20:14:13 -07:00

When you install this from git, you will need to first clone the repository:

git clone git://projects.mako.cc/mediawiki_dump_tools

From within the repository working directory, initiatlize and set up the submodule like:

git submodule init
git submodule update

Wikimedia dumps are usually in a compressed format such as 7z (most common), gz, or bz2. Wikiq uses your computer's compression software to read these files. Therefore wikiq depends on [7za]{.title-ref}, [gzcat]{.title-ref}, and [zcat]{.title-ref}.

Dependencies

These non-Python dependencies must be installed on your system for wikiq and its associated tests to work.

  • 7zip
  • ffmpeg

A new diff engine based on [_wikidiff2]{.title-ref} can be used for word-persistence. Wikiq can also output the diffs between each page revision. This requires installing Wikidiff 2 on your system. On Debian or Ubuntu Linux this can be done via.

apt-get install php-wikidiff2

You may have to also run. sudo phpenmod wikidiff2.

Tests ----To run tests:

python -m unittest test.Wikiq_Unit_Test

TODO:

  1. [] Output metadata about the run. What parameters were used? What versions of deltas?
  2. [] Url encoding by default
Description
No description provided
Readme 91 MiB
Languages
Python 100%