OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env 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 # Example run from the server2/ directory: | 6 # Example run from the server2/ directory: |
7 # $ converter.py ../static/ ../../api templates/articles/ templates/intros/ | 7 # $ converter.py ../static/ ../../api templates/articles/ templates/intros/ |
8 # templates/public/ static/images/ -r | 8 # templates/public/ static/images/ -r |
9 | 9 |
10 import json | 10 import json |
(...skipping 21 matching lines...) Expand all Loading... |
32 'index', | 32 'index', |
33 # These are APIs that should not have docs. | 33 # These are APIs that should not have docs. |
34 'test', | 34 'test', |
35 'experimental_idltest', | 35 'experimental_idltest', |
36 ] | 36 ] |
37 | 37 |
38 # These are mappings for APIs that have no intros. They are needed because the | 38 # These are mappings for APIs that have no intros. They are needed because the |
39 # names of the JSON files do not give enough information on the actual API name. | 39 # names of the JSON files do not give enough information on the actual API name. |
40 CUSTOM_MAPPINGS = { | 40 CUSTOM_MAPPINGS = { |
41 'experimental_input_virtual_keyboard': 'experimental_input_virtualKeyboard', | 41 'experimental_input_virtual_keyboard': 'experimental_input_virtualKeyboard', |
42 'input_ime': 'input_ime' | 42 'input_ime': 'input_ime', |
| 43 'app_window': 'app_window' |
43 } | 44 } |
44 | 45 |
45 # These are the extension-only APIs that don't have explicit entries in | 46 # These are the extension-only APIs that don't have explicit entries in |
46 # _permission_features.json, so we can't programmatically figure out that it's | 47 # _permission_features.json, so we can't programmatically figure out that it's |
47 # extension-only. | 48 # extension-only. |
48 # From api_page_generator.js:548. | 49 # From api_page_generator.js:548. |
49 EXTENSIONS_ONLY = [ | 50 EXTENSIONS_ONLY = [ |
50 'browserAction', | 51 'browserAction', |
51 'extension', | 52 'extension', |
52 'input.ime', | 53 'input.ime', |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 if (not opts.file and len(args) != 6) or (opts.file and len(args) != 7): | 336 if (not opts.file and len(args) != 6) or (opts.file and len(args) != 7): |
336 parser.error('incorrect number of arguments.') | 337 parser.error('incorrect number of arguments.') |
337 | 338 |
338 if opts.file: | 339 if opts.file: |
339 _MoveSingleFile(*args, replace=opts.replace, svn=opts.svn) | 340 _MoveSingleFile(*args, replace=opts.replace, svn=opts.svn) |
340 else: | 341 else: |
341 _MoveAllFiles(*args, | 342 _MoveAllFiles(*args, |
342 replace=opts.replace, | 343 replace=opts.replace, |
343 exclude_dir=opts.exclude, | 344 exclude_dir=opts.exclude, |
344 svn=opts.svn) | 345 svn=opts.svn) |
OLD | NEW |