-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to process templates. #8
Comments
Hi, thanks for your input! I haven't looked at your example yet, but in general, the way to load templates is to inherit from mw.Preprocessor and override the get_template method. There is an example here: https://github.com/lambdafu/smc.mw/blob/master/tests/mwtests.py#L71 |
what am I suppose to return there? this did not work for me:
|
Mh, dunno what went wrong for you, but with 6017eb5 there is a simpler example now:
|
I am trying to process a wikimedia database dump and this is the only library I found which actually does what I need however I can't figure out how to process wiki templates. Any suggestions?
here is the page on the wiki I am processing from the dump:
http://en.wikivoyage.org/wiki/%27s-Hertogenbosch
page in the mediawiki format:
https://gist.github.com/miki725/991793c24b4fc2bf41b2
processed html:
https://gist.github.com/miki725/f3df910f63525f9fc47d
As you can see a bunch of places are not processed such as sleep section - https://gist.github.com/miki725/f3df910f63525f9fc47d#file-processed-L115-L123
The text was updated successfully, but these errors were encountered: