equal
deleted
inserted
replaced
35 } |
35 } |
36 |
36 |
37 def update_chapter_index(browser_info: Path, chapter: String, new_sessions: List[(String, String)]) |
37 def update_chapter_index(browser_info: Path, chapter: String, new_sessions: List[(String, String)]) |
38 { |
38 { |
39 val dir = browser_info + Path.basic(chapter) |
39 val dir = browser_info + Path.basic(chapter) |
40 Isabelle_System.mkdirs(dir) |
40 Isabelle_System.make_directory(dir) |
41 |
41 |
42 val sessions0 = |
42 val sessions0 = |
43 try { read_sessions(dir) } |
43 try { read_sessions(dir) } |
44 catch { case _: XML.Error => Nil } |
44 catch { case _: XML.Error => Nil } |
45 |
45 |
62 } |
62 } |
63 |
63 |
64 def make_global_index(browser_info: Path) |
64 def make_global_index(browser_info: Path) |
65 { |
65 { |
66 if (!(browser_info + Path.explode("index.html")).is_file) { |
66 if (!(browser_info + Path.explode("index.html")).is_file) { |
67 Isabelle_System.mkdirs(browser_info) |
67 Isabelle_System.make_directory(browser_info) |
68 File.copy(Path.explode("~~/lib/logo/isabelle.gif"), |
68 File.copy(Path.explode("~~/lib/logo/isabelle.gif"), |
69 browser_info + Path.explode("isabelle.gif")) |
69 browser_info + Path.explode("isabelle.gif")) |
70 File.write(browser_info + Path.explode("index.html"), |
70 File.write(browser_info + Path.explode("index.html"), |
71 File.read(Path.explode("~~/lib/html/library_index_header.template")) + |
71 File.read(Path.explode("~~/lib/html/library_index_header.template")) + |
72 File.read(Path.explode("~~/lib/html/library_index_content.template")) + |
72 File.read(Path.explode("~~/lib/html/library_index_content.template")) + |
86 { |
86 { |
87 val session_prefix = browser_info + Path.basic(info.chapter) + Path.basic(name) |
87 val session_prefix = browser_info + Path.basic(info.chapter) + Path.basic(name) |
88 val session_fonts = session_prefix + Path.explode("fonts") |
88 val session_fonts = session_prefix + Path.explode("fonts") |
89 |
89 |
90 if (info.options.bool("browser_info")) { |
90 if (info.options.bool("browser_info")) { |
91 Isabelle_System.mkdirs(session_fonts) |
91 Isabelle_System.make_directory(session_fonts) |
92 |
92 |
93 val session_graph = session_prefix + Path.basic("session_graph.pdf") |
93 val session_graph = session_prefix + Path.basic("session_graph.pdf") |
94 File.copy(graph_file, session_graph.file) |
94 File.copy(graph_file, session_graph.file) |
95 Isabelle_System.chmod("a+r", session_graph) |
95 Isabelle_System.chmod("a+r", session_graph) |
96 |
96 |