I have mediawiki and parsoid setup locally
I am trying to expand templates locally, while coverting from wikitetx to HTML. But templates remain as it is.
can anyone suggest where i am going wrong
Import templates to your wiki
I have mediawiki and parsoid setup locally
I am trying to expand templates locally, while coverting from wikitetx to HTML. But templates remain as it is.
can anyone suggest where i am going wrong
How to do it,
I have enabled few extensions like ParserFunctions, Scribunto, to expand templates.
I am trying to convert "{{Convert|907|hp|kW PS|0|abbr=on}}" --> "907 hp (676 kW; 920 PS)" but i get output as "Template:Convert"
You need to create a page on your local wiki, //localhost/wiki/Template:Convert, or whathaveyou.
You can copy the source from enwiki, https://en.wikipedia.org/w/index.php?title=Template:Convert&action=edit
Although, that seems to invoke a Scribunto module, so you'll also need a //localhost/wiki/Module:Convert as well.
Again, the source can be copied from, https://en.wikipedia.org/w/index.php?title=Module:Convert&action=edit
Alternatively, depending on how you're planning on using the tool, you can set --domain en.wikipedia.org to use the templates defined there, but then you won't have access to the pages on your local wiki.
As @Arlolra said, if you don't have these templates, you will need to import them onto your wiki first. https://en.wikipedia.org/wiki/Special:Export is your friend. You would then import that to your local wiki via http://localhost/wiki/Special:Import
@Arlolra and @SSastry (WMF) Thanks for guidinig me through the solution,
Another question has arised to me, likewise i have multiple templates which i need to expand while converting from wikitext to HTML. So manual importing of each template could be cumbersome. Is there a way to download all the template dumps at once and then import to local mediwaiki.
Again, you might want to consider parsing with --domain en.wikipedia.org or wherever you're getting this content from, rather than your local wiki
There are larger project dumps you can import at https://meta.wikimedia.org/wiki/Data_dumps