Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: chrome/common/extensions/docs/server2/converter.py

Issue 10829314: Extension docs server: CSS and content tweaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 10 matching lines...) Expand all
21 21
22 from converter_html_parser import HandleDocFamily 22 from converter_html_parser import HandleDocFamily
23 from docs_server_utils import SanitizeAPIName 23 from docs_server_utils import SanitizeAPIName
24 24
25 IGNORED_FILES = [ 25 IGNORED_FILES = [
26 # These are custom files. 26 # These are custom files.
27 '404', 27 '404',
28 'apps_api_index', 28 'apps_api_index',
29 'api_index', 29 'api_index',
30 'experimental', 30 'experimental',
31 'samples', 31 'samples',
cduvall 2012/08/20 17:45:45 You're going to need to add 'about_apps' here.
not at google - send to devlin 2012/08/21 02:21:28 I did this differently, by excluding anything that
32 'index', 32 'index',
33 'devtools', # Has an intro, but marked as nodoc. 33 'devtools', # Has an intro, but marked as nodoc.
34 ] 34 ]
35 35
36 # These are mappings for APIs that have no intros. They are needed because the 36 # These are mappings for APIs that have no intros. They are needed because the
37 # names of the JSON files do not give enough information on the actual API name. 37 # names of the JSON files do not give enough information on the actual API name.
38 CUSTOM_MAPPINGS = { 38 CUSTOM_MAPPINGS = {
39 'experimental_input_virtual_keyboard': 'experimental_input_virtualKeyboard', 39 'experimental_input_virtual_keyboard': 'experimental_input_virtualKeyboard',
40 'input_ime': 'input_ime', 40 'input_ime': 'input_ime',
41 'app_window': 'app_window' 41 'app_runtime': 'app_runtime',
42 'app_window': 'app_window',
42 } 43 }
43 44
44 # These are the extension-only APIs that don't have explicit entries in 45 # These are the extension-only APIs that don't have explicit entries in
45 # _permission_features.json, so we can't programmatically figure out that it's 46 # _permission_features.json, so we can't programmatically figure out that it's
46 # extension-only. 47 # extension-only.
47 # From api_page_generator.js:548. 48 # From api_page_generator.js:548.
48 EXTENSIONS_ONLY = [ 49 EXTENSIONS_ONLY = [
49 'browserAction', 50 'browserAction',
50 'extension', 51 'extension',
51 'input_ime', 52 'input_ime',
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (not opts.file and len(args) != 6) or (opts.file and len(args) != 7): 355 if (not opts.file and len(args) != 6) or (opts.file and len(args) != 7):
355 parser.error('incorrect number of arguments.') 356 parser.error('incorrect number of arguments.')
356 357
357 if opts.file: 358 if opts.file:
358 _MoveSingleFile(*args, replace=opts.replace, svn=opts.svn) 359 _MoveSingleFile(*args, replace=opts.replace, svn=opts.svn)
359 else: 360 else:
360 _MoveAllFiles(*args, 361 _MoveAllFiles(*args,
361 replace=opts.replace, 362 replace=opts.replace,
362 exclude_dir=opts.exclude, 363 exclude_dir=opts.exclude,
363 svn=opts.svn) 364 svn=opts.svn)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698