// the following directory must exist for image references
String imageDirectory = "c:/temp/dump/WikiDumpImages";
System.out.println("Prepare wiki database");
db = prepareDB(mainDirectory);
IArticleFilter handler;
WikiXMLParser wxp;
if (!skipFirstPass) {
System.out.println("First pass - write templates to database:");
handler = new DemoTemplateArticleFilter(db);
wxp = new WikiXMLParser(bz2Filename, handler);
wxp.parse();
System.out.println(' ');
}
System.out.println("Second pass - write HTML files to directory:");
handler = new DemoArticleFilter(db, htmlDirectory, imageDirectory);
wxp = new WikiXMLParser(bz2Filename, handler);
wxp.parse();
System.out.println(' ');
System.out.println("Done!");
} catch (Exception e) {
e.printStackTrace();
} finally {