/**
* Generates HTML documentation for the Soup session
* @param title title on the window
* @param description the header of the page
* @throws IOException throws if it cannot store
*/
public static void generateOutputDocumentation(String title, String description) throws IOException {
try {
FileWriter f = new FileWriter(System.getProperty("user.dir") + "\\" + "SoupNoodle.html");
f.write("<style>h1 { color: blue;}p { color: red;}div { display: flex; align-items: center; justify-content: center; flex-direction: column;}</style><title>");
f.write(title);
f.write("</title><center><h1>");
f.write(description + " [" + LocalTime.now().getHour() + ":" + LocalTime.now().getMinute() + "]");
f.write("</h1></center><div><p>Local Vars</p><ul>");
writeVars(f);
f.write("</ul><p>Outputs</p><ul>");
writeOutputs(f);
f.write("</ul></div><div><p>Questions Asked</p><ul>");
writeQuestions(f);
f.write("</ul></div>");
f.close();
System.out.println("Output Generated at " + System.getProperty("user.dir") + "\\" + "SoupNoodle.html");
}
catch (IOException ex) {
System.out.println("Error storing output documentation at " + System.getProperty("user.dir") + "\\" + "SoupNoodle.html");
}
}
HTMLGen.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:Soup
作者:
评论列表
文章目录