public void testTranslateHTMLToLaTeX() throws Exception {
File root = new File("../org.openiaml.model/model/docs/");
assertTrue(root + " should exist", root.exists());
assertTrue(root + " should be a directory", root.isDirectory());
TranslateHTMLToLatex converter = new TranslateHTMLToLatex();
// for each .html file
for (File html : root.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".html");
}} )) {
// translate it
System.out.println("Reading in " + html.getName() + "...");
try {
String output = converter.convertToTex(html);
// write it out
File tex = new File(html.getAbsolutePath().replace(".html", ".tex"));
System.out.println("Writing to " + tex.getName() + "...");