equal
deleted
inserted
replaced
89 Usage: isabelle update_cartouches [FILES|DIRS...] |
89 Usage: isabelle update_cartouches [FILES|DIRS...] |
90 |
90 |
91 Options are: |
91 Options are: |
92 -t replace @{text} antiquotations within text tokens |
92 -t replace @{text} antiquotations within text tokens |
93 |
93 |
94 Recursively find .thy files and update theory syntax to use cartouches |
94 Recursively find .thy or ROOT files and update theory syntax to use |
95 instead of old-style {* verbatim *} or `alt_string` tokens. |
95 cartouches instead of old-style {* verbatim *} or `alt_string` tokens. |
96 |
96 |
97 Old versions of files are preserved by appending "~~". |
97 Old versions of files are preserved by appending "~~". |
98 """, |
98 """, |
99 "t" -> (_ => replace_text = true)) |
99 "t" -> (_ => replace_text = true)) |
100 |
100 |
101 val specs = getopts(args) |
101 val specs = getopts(args) |
102 if (specs.isEmpty) getopts.usage() |
102 if (specs.isEmpty) getopts.usage() |
103 |
103 |
104 for { |
104 for { |
105 spec <- specs |
105 spec <- specs |
106 file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy")) |
106 file <- File.find_files(Path.explode(spec).file, |
|
107 file => file.getName.endsWith(".thy") || file.getName == "ROOT") |
107 } update_cartouches(replace_text, File.path(file)) |
108 } update_cartouches(replace_text, File.path(file)) |
108 }) |
109 }) |
109 } |
110 } |