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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 parser.add_option("--dump-render-tree-path", dest="dump_render_tree_path", | 181 parser.add_option("--dump-render-tree-path", dest="dump_render_tree_path", |
182 metavar="PATH", | 182 metavar="PATH", |
183 help="path to DumpRenderTree executable") | 183 help="path to DumpRenderTree executable") |
184 parser.add_option("--page-name", dest="page_name", metavar="PAGE", | 184 parser.add_option("--page-name", dest="page_name", metavar="PAGE", |
185 help="only generate docs for PAGE.html") | 185 help="only generate docs for PAGE.html") |
186 parser.add_option("--nozip", dest="zips", action="store_false", | 186 parser.add_option("--nozip", dest="zips", action="store_false", |
187 help="do not generate zip files for samples", | 187 help="do not generate zip files for samples", |
188 default=True) | 188 default=True) |
189 options, args = parser.parse_args() | 189 options, args = parser.parse_args() |
190 | 190 |
191 # This is a script that converts the documentation from the old style (using | |
192 # build.py, etc.) to the new style. The new docs and docs server can be found | |
193 # in the ../server2 directory. | |
194 Popen([os.path.join(_base_dir, 'server2', 'converter.py'), | |
not at google - send to devlin
2012/08/01 20:41:04
paths here need to be fixed so that it can be run
cduvall
2012/08/02 00:54:06
Done.
| |
195 '../static', | |
196 '../../api', | |
197 'templates/articles', | |
198 'templates/intros', | |
199 'templates/public', | |
200 'static/images', | |
201 '-r']) | |
202 | |
191 if (options.dump_render_tree_path and | 203 if (options.dump_render_tree_path and |
192 os.path.isfile(options.dump_render_tree_path)): | 204 os.path.isfile(options.dump_render_tree_path)): |
193 dump_render_tree = options.dump_render_tree_path | 205 dump_render_tree = options.dump_render_tree_path |
194 else: | 206 else: |
195 dump_render_tree = FindDumpRenderTree() | 207 dump_render_tree = FindDumpRenderTree() |
196 | 208 |
197 # Load the manifest of existing API Methods | 209 # Load the manifest of existing API Methods |
198 api_manifest = ApiManifest(_extension_api_json_schemas, | 210 api_manifest = ApiManifest(_extension_api_json_schemas, |
199 _extension_api_idl_schemas) | 211 _extension_api_idl_schemas) |
200 | 212 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 # Cleanup our temporary IDL->JSON files | 248 # Cleanup our temporary IDL->JSON files |
237 api_manifest.cleanupGeneratedFiles() | 249 api_manifest.cleanupGeneratedFiles() |
238 | 250 |
239 if 'EX_OK' in dir(os): | 251 if 'EX_OK' in dir(os): |
240 return os.EX_OK | 252 return os.EX_OK |
241 else: | 253 else: |
242 return 0 | 254 return 0 |
243 | 255 |
244 if __name__ == '__main__': | 256 if __name__ == '__main__': |
245 sys.exit(main()) | 257 sys.exit(main()) |
OLD | NEW |