To install ProofreadPage in MediaWiki-Docker the following steps need to be done:
-
Clone the ProofreadPage repository into
mediawiki/extensions/ProofreadPage
(Command should be something likegit clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/ProofreadPage" ProofreadPage
) -
Clone the ParserFunctions repository into
mediawiki/extensions/ParserFunctions
(Command should be something likegit clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions" ParserFunctions
) -
Run
docker-compose exec -u 0 mediawiki bash -c 'apt update && apt install djvulibre-bin netpbm'
-
Add the following text to the end of
mediawiki/LocalSettings.php
: (skip this step if you have done this before)
wfLoadExtension( 'ProofreadPage' );
wfLoadExtension( 'ParserFunctions' );
$wgFileExtensions[] = 'djvu';
$wgDjvuDump = "djvudump";
$wgDjvuRenderer = "ddjvu";
$wgDjvuTxt = "djvutxt";
$wgDjvuPostProcessor = "pnmtojpeg";
$wgDjvuOutputExtension = 'jpg';
-
Download
Wikisource-20210103174144.xml
file (inside this repository) into themediawiki/
directory (make sure the file is namedWikisource-20210103174144.xml
) -
Run
docker-compose exec -u 0 mediawiki bash -c 'php maintenance/importDump.php < ./Wikisource-20210103174144.xml'
-
Run
docker-compose exec -u 0 mediawiki bash -c 'php maintenance/rebuildrecentchanges.php'
-
Run
docker-compose exec -u 0 mediawiki bash -c 'php maintenance/initSiteStats.php'
-
Delete
Wikisource-20210103174144.xml
-
Add
$wgUseInstantCommons = true;
to yourmediawiki/LocalSettings.php
. -
Navigate to http://localhost:8080/wiki/Index:War_and_Peace.djvu and click
edit
(orCreate Source
) followed bySave Changes
.