CoolFace
Apppublic

arolstar52/zhtest

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

ZH Wikipedia Local MediaWiki on Hugging Face Space

v14: fixes SecurePoll installation, verifies every required extension at build time, and scans dump content models before import.

Progress page:

text
/import-status.txt

Default dump:

text
https://dumps.wikimedia.org/zhwiki/20260601/zhwiki-20260601-pages-articles.xml.bz2

Installed extensions:

text
ParserFunctions
Cite
Scribunto
TemplateStyles
SyntaxHighlight_GeSHi
Echo
Flow
MassMessage
Gadgets
JsonConfig
SecurePoll
Parsoid

Before importing, v12 scans all <model>...</model> values in the dump and writes:

text
/data/logs/content-models.txt
/data/logs/unknown-content-models.txt

Recommended variables:

text
MW_SERVER=https://your-space.hf.space
MW_DB_PASSWORD=your-password
MW_SECRET_KEY=random-long-string
MW_UPGRADE_KEY=random-long-string
MYSQL_BUFFER_POOL_SIZE=6G
AUTO_IMPORT=1
IMPORT_NAMESPACES=
STRICT_CONTENT_MODEL_CHECK=1

Empty IMPORT_NAMESPACES means importing all dump pages.

v13 fix: SecurePoll

The 2026-06-01 zhwiki dump preflight scan showed these models:

text
MassMessageListContent
Scribunto
SecurePoll
css
flow-board
javascript
json
sanitized-css
wikitext

v13 adds the real extension:

php
wfLoadExtension( 'SecurePoll' );

It also adds SecurePoll to the preflight known-model list.

v14 fix

v13 enabled SecurePoll in LocalSettings.php but the Dockerfile clone list accidentally did not clone SecurePoll.

v14 fixes the clone list and adds a build-time integrity check:

dockerfile
for ext in Scribunto ParserFunctions Cite TemplateStyles SyntaxHighlight_GeSHi Echo Flow MassMessage Gadgets JsonConfig SecurePoll; do
  test -f "$ext/extension.json" || (echo "Missing extension.json for $ext" && exit 1)
done

So if any required extension is not actually installed, the Docker build fails immediately instead of failing at runtime.