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
