Closed sh0416 closed 4 years ago
Could you give a more expansive example of what does work properly?
In that wikitext, {{
}}
doesn't work well..
That wikitext comes from the dump database in wikipedia.
That's not an internal link, it is a template, there is some support for templates in mwcomposerfromhell, but it is very manual (and poorly documented).
You should be able to render templates via something like:
# Add custom templates that are necessary.
templates = {
'Use dmy dates': mwparserfromhell.parse('<the content of this template>'),
}
# Manually create the composer.
composer = mwcomposerfromhell.WikicodeToHtmlComposer(
base_url=<base URL>, template_store=templates)
# Parse & compose.
wikicode = mwparserfromhell.parse(text)
html = composer.compose(wikicode)
There isn't support for automatically fetching any of the templates or things like that at the moment unfortunately. There are some work-in-progress branches, but nothing is far along enough to share.
Thanks for the reply. For now, I just use parsoid. It is slow but accurate.
First, thanks for implementing this.
It works well :)
The one which isn't convert is the internal link inside the wikitext. It starts with
{{
and ends with}}
.Could you implement this component?
I'm not sure but also
sfn
things could be a flag for internal link.Thanks.