That worked. Thanks for your help. I now have the latest dump of the whole English Wikipedia running locally on my laptop using this:
http://users.softlab.ece.ntua.gr/~ttsiod/buildWikipediaOffline.html Searching and rendering are almost instant! Jonathan On Sat, Feb 25, 2012 at 5:38 PM, Platonides <[email protected]> wrote: > On 24/02/12 07:38, Jonathan Boler wrote: >> I'm trying to write a command line mediawiki markup parser that >> doesn't require a full Mediawiki setup/installation with database etc. >> >> So far I have this below which works pretty good but requires that my >> Mediawiki installation be set up with a database. >> >> How can I remove the database dependency from this script? > > You could create a dummy database class. But it's probably easier to use > an empty database. You can use sqlite to avoid having to run a database > server. > >> Also, the article links generated are in the format >> /index?title=Article_Title&action=edit&redlink=1 how can I change >> the formatting of these parameters so that it's just /Article_Title > > They are in that format because those pages are missing (for existing > ones see $wgArticlePath). > You can hook TitleIsAlwaysKnown and unconditionally set $isKnown to true > (this is a very recent hook, on older versions you will need to modify > Title::isAlwaysKnown() ) > > > > > _______________________________________________ > MediaWiki-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
