Skip to main content

Module tools

Module tools 

Source
Expand description

The auxiliary command-line tools shipped alongside wikiextractor: extractPage (pull a single page’s raw XML from a dump) and cirrus-extract (extract from CirrusSearch JSON dumps).

Modules§

cirrus
Port of wikiextractor’s cirrus-extract.py: extracts documents from Wikipedia CirrusSearch JSON dumps, whose text already has templates expanded. Output matches the original byte for byte — including its hardcoded http://it.wikipedia.org/ URL base, kept for parity.
extract_page
Port of wikiextractor’s extractPage: scans a dump line by line and prints the raw XML of matching pages. Faithful to the original’s line-oriented logic, including its quirks: any <id> inside the page (page id, revision id, contributor id) matches --id, and in --template mode all Template: pages are printed while their non-matching <id> lines are omitted.