wikibooks: drop markup residue (v2#116), label by contribution date (v2#110), withhold one page
Implements v2#110 option B and v2#116 option A for wikibooks, as #125 did for wikivoyage.
One more page withheld: wikibooks_1389 (Książka kucharska/Kokardki z mięsem na słodko, 368 tokens). Wikibooks deleted it on 2026-06-02 after a speedy-deletion tag reading "Kopia z internetu (prawa autorskie?)" with a link to a mistrzkuchni.pl recipe. It is added to DROPPED_PAGES (47 pages). retext now withholds a page listed after the build before it measures the cleanup.
Markup residue (v2#116). retext applied drop_residue to the committed text:
- 2,087 rows changed;
- 130,250 characters and 51,535 tokens removed;
- 17 pages fell under 200 characters and were dropped (listed in
wikibooks.build.jsonand the findings).
This source exposed three faults in drop_residue. The fixes apply to every source:
- the size pattern
\d*x?\d+ ?pxbacktracked without end on lines of digits (wikibooks_31290). It is now(?:\d*x)?\d+ ?px, and a test bounds the time; alt=,link=and other key=value options are removed only next to a pipe, not alone on a line;- the table start
{| class=...is no longer read as a file option. Four wikivoyage rows from #125 lost their| class=...and keep a lone{:wikivoyage_2055,2564,9129,10490. A follow-up PR rebuilds them.
Labels by contribution date (v2#110). Source: the stub dump plwikibooks-20261001-stub-meta-history.xml.gz. 3,014 pre-cutoff revisions were fetched and compared.
license |
documents | tokens |
|---|---|---|
CC-BY-SA-3.0 |
6,796 | 11,431,761 |
CC-BY-SA-3.0 AND CC-BY-SA-4.0 |
995 | 2,468,522 |
CC-BY-SA-4.0 |
1,257 | 1,361,043 |
On main the labels follow the last revision: 3.0 4,425, 4.0 4,641. Of the 4.0 rows still released, 2,381 are now 3.0 and 995 are both.
Labels for pages whose earlier text could not be compared:
- Hidden pre-cutoff text (21 pages): labelled both.
- Not in the dump (2 pages): labelled both.
wikibooks_4757was deleted as "not a recipe".wikibooks_20267was moved to a user's sandbox. - Edited before the cutoff and deleted since (5 pages): stay 3.0.
wiki_history.py comparegave them nopre_cutoff_revid; it now records the shipped revision, and the card says so only where this case occurs. These pages were deleted as spam or duplicates, not as copies, and stay in the release.
wikibooks.gfdl-review.json is recounted on the cleaned text: the same 45 documents, 121,973 tokens. 39 of them are 3.0 and 6 are both.
Totals go from 9,066 / 38,195,523 / 15,313,229 (docs / chars / tokens) to 9,048 / 38,064,404 / 15,261,326.
Tests. The wikibooks, wikimedia and wiki_history suites pass (99). The full suite in an LFS-skip worktree has no new failures: 91 failed / 18 errors, against 95 / 18 before. The 4 that now pass are wikibooks' own. A rerun of retext, relabel and datasheet is byte-identical.
Not done here. wikinews, wikipedia, the talk pages and wiktionary_examples each get their own PR. README, CHANGELOG and totals go to v2#80.
🤖 Generated with Claude Code
refs/pr/127 ref