1 package edu.berkeley.fleet.doc;
9 public static void print() throws Exception {
10 if (!new File(".tmp").exists())
11 new File(".tmp").mkdirs();
12 PrintWriter pw = new PrintWriter(new FileOutputStream(".tmp/FleetTwo.Manual.tex"));
13 BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("doc/archman.tex")));
14 for(String s = br.readLine(); s!=null; s = br.readLine())
16 for(String f : new File("ships").list()) {
17 print(pw, new ShipDescription(f, new BufferedReader(new InputStreamReader(new FileInputStream(new File("ships/"+f))))));
19 pw.println("\\end{document}");
23 private static void print(PrintWriter pw, ShipDescription sd) throws Exception {
24 pw.println("\\pagebreak");
25 pw.println("\\section*{The {\\tt "+sd.getName()+"} Ship}");
26 String tex = sd.getSection("tex");
29 for(BenkoBoxDescription bbd : sd) {
30 pw.println("\\subsection*{"+(bbd.isInbox() ? "Inbox: " : "Outbox: ")+"{\\tt "+bbd.getName()+"}}");