OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Docbuilder for extension docs.""" | 6 """Docbuilder for extension docs.""" |
7 | 7 |
8 import glob | 8 import glob |
9 import os | 9 import os |
10 import os.path | 10 import os.path |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 parser = OptionParser() | 176 parser = OptionParser() |
177 parser.add_option("--dump-render-tree-path", dest="dump_render_tree_path", | 177 parser.add_option("--dump-render-tree-path", dest="dump_render_tree_path", |
178 metavar="PATH", | 178 metavar="PATH", |
179 help="path to DumpRenderTree executable") | 179 help="path to DumpRenderTree executable") |
180 parser.add_option("--page-name", dest="page_name", metavar="PAGE", | 180 parser.add_option("--page-name", dest="page_name", metavar="PAGE", |
181 help="only generate docs for PAGE.html") | 181 help="only generate docs for PAGE.html") |
182 parser.add_option("--nozip", dest="zips", action="store_false", | 182 parser.add_option("--nozip", dest="zips", action="store_false", |
183 help="do not generate zip files for samples", | 183 help="do not generate zip files for samples", |
184 default=True) | 184 default=True) |
185 options, args = parser.parse_args() | 185 options, args = parser.parse_args() |
186 | 186 |
not at google - send to devlin
2012/07/31 22:25:46
comment, explain what this does, why we do it, whe
cduvall
2012/08/01 01:40:50
Done.
| |
187 Popen([os.path.join(_base_dir, 'server2', 'converter.py'), | |
188 '../static', | |
189 '../../api', | |
190 'templates/articles', | |
191 'templates/intros', | |
192 'templates/public', | |
193 'static/images', | |
194 '-r']) | |
195 | |
187 if (options.dump_render_tree_path and | 196 if (options.dump_render_tree_path and |
188 os.path.isfile(options.dump_render_tree_path)): | 197 os.path.isfile(options.dump_render_tree_path)): |
189 dump_render_tree = options.dump_render_tree_path | 198 dump_render_tree = options.dump_render_tree_path |
190 else: | 199 else: |
191 dump_render_tree = FindDumpRenderTree() | 200 dump_render_tree = FindDumpRenderTree() |
192 | 201 |
193 # Load the manifest of existing API Methods | 202 # Load the manifest of existing API Methods |
194 api_manifest = ApiManifest(_extension_api_json_schemas, | 203 api_manifest = ApiManifest(_extension_api_json_schemas, |
195 _extension_api_idl_schemas) | 204 _extension_api_idl_schemas) |
196 | 205 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
232 # Cleanup our temporary IDL->JSON files | 241 # Cleanup our temporary IDL->JSON files |
233 api_manifest.cleanupGeneratedFiles() | 242 api_manifest.cleanupGeneratedFiles() |
234 | 243 |
235 if 'EX_OK' in dir(os): | 244 if 'EX_OK' in dir(os): |
236 return os.EX_OK | 245 return os.EX_OK |
237 else: | 246 else: |
238 return 0 | 247 return 0 |
239 | 248 |
240 if __name__ == '__main__': | 249 if __name__ == '__main__': |
241 sys.exit(main()) | 250 sys.exit(main()) |
OLD | NEW |