Il giorno martedì 14 aprile 2015 15:18:02 UTC+2, Sebastiano Vigna ha scritto:
Is there any simple way to convert Wikimedia data to HTML using Bliki skipping infoxboxes, taxoboxes, etc.? We need to have an HTML version of Wikipedia that contains only "link in real text", rather than links coming from compiled tables.
I'll answer to myself:
private static class MyWikiModel extends WikiModel {
private final boolean keepTemplates;
public MyWikiModel( String imageBaseURL, String linkBaseURL, final boolean keepTemplates ) {
super( imageBaseURL, linkBaseURL );
this.keepTemplates = keepTemplates;
}
@Override
public void substituteTemplateCall( String templateName, Map<String,String> parameterMap, Appendable writer ) throws IOException {
if ( keepTemplates ) super.substituteTemplateCall( templateName, parameterMap, writer );
}
}