OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 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 """Script to generate rst index file doxygen generated html files. | 6 """Script to generate rst index file doxygen generated html files. |
7 """ | 7 """ |
8 | 8 |
9 import argparse | 9 import argparse |
10 import cStringIO | 10 import cStringIO |
11 import fnmatch | 11 import fnmatch |
12 import os | 12 import os |
13 import re | 13 import re |
14 import sys | 14 import sys |
15 | 15 |
16 VALID_CHANNELS = ('stable', 'beta', 'dev') | 16 VALID_CHANNELS = ('stable', 'beta', 'dev') |
17 | 17 |
18 ROOT_FILE_CONTENTS = """\ | 18 ROOT_FILE_CONTENTS = """\ |
19 .. _pepper_%(channel)s_index: | 19 .. _pepper_%(channel)s_index: |
20 | 20 |
21 | |
22 :orphan: | 21 :orphan: |
23 | 22 |
24 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. | 23 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. |
25 | 24 |
| 25 .. include:: /migration/deprecation.inc |
| 26 |
26 ######################################## | 27 ######################################## |
27 Pepper API Reference (%(channel_title)s) | 28 Pepper API Reference (%(channel_title)s) |
28 ######################################## | 29 ######################################## |
29 | 30 |
30 This page lists the API for Pepper %(version)s. Apps that use this API can | 31 This page lists the API for Pepper %(version)s. Apps that use this API can |
31 run in Chrome %(version)s or higher. | 32 run in Chrome %(version)s or higher. |
32 | 33 |
33 :ref:`Pepper C API Reference <pepper_%(channel)s_c_index>` | 34 :ref:`Pepper C API Reference <pepper_%(channel)s_c_index>` |
34 =========================================================== | 35 =========================================================== |
35 | 36 |
36 :ref:`Pepper C++ API Reference <pepper_%(channel)s_cpp_index>` | 37 :ref:`Pepper C++ API Reference <pepper_%(channel)s_cpp_index>` |
37 =============================================================== | 38 =============================================================== |
38 | 39 |
39 """ | 40 """ |
40 | 41 |
41 C_FILE_CONTENTS = """\ | 42 C_FILE_CONTENTS = """\ |
42 .. _pepper_%(channel)s_c_index: | 43 .. _pepper_%(channel)s_c_index: |
43 .. _c-api%(channel_alt)s: | 44 .. _c-api%(channel_alt)s: |
44 | 45 |
45 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. | 46 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. |
46 | 47 |
| 48 .. include:: /migration/deprecation.inc |
| 49 |
47 ########################################## | 50 ########################################## |
48 Pepper C API Reference (%(channel_title)s) | 51 Pepper C API Reference (%(channel_title)s) |
49 ########################################## | 52 ########################################## |
50 | 53 |
51 This page lists the C API for Pepper %(version)s. Apps that use this API can | 54 This page lists the C API for Pepper %(version)s. Apps that use this API can |
52 run in Chrome %(version)s or higher. | 55 run in Chrome %(version)s or higher. |
53 | 56 |
54 `Interfaces <pepper_%(channel)s/c/group___interfaces.html>`__ | 57 `Interfaces <pepper_%(channel)s/c/group___interfaces.html>`__ |
55 ============================================================= | 58 ============================================================= |
56 %(interfaces)s | 59 %(interfaces)s |
(...skipping 22 matching lines...) Expand all Loading... |
79 C_INTERFACE_WILDCARDS = ['struct_p_p_p__*', 'struct_p_p_b__*'] | 82 C_INTERFACE_WILDCARDS = ['struct_p_p_p__*', 'struct_p_p_b__*'] |
80 | 83 |
81 C_STRUCT_WILDCARDS = ['struct_p_p__*', 'union_p_p__*'] | 84 C_STRUCT_WILDCARDS = ['struct_p_p__*', 'union_p_p__*'] |
82 | 85 |
83 CPP_FILE_CONTENTS = """\ | 86 CPP_FILE_CONTENTS = """\ |
84 .. _pepper_%(channel)s_cpp_index: | 87 .. _pepper_%(channel)s_cpp_index: |
85 .. _cpp-api%(channel_alt)s: | 88 .. _cpp-api%(channel_alt)s: |
86 | 89 |
87 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. | 90 .. DO NOT EDIT! This document is auto-generated by doxygen/rst_index.py. |
88 | 91 |
| 92 .. include:: /migration/deprecation.inc |
| 93 |
89 ############################################ | 94 ############################################ |
90 Pepper C++ API Reference (%(channel_title)s) | 95 Pepper C++ API Reference (%(channel_title)s) |
91 ############################################ | 96 ############################################ |
92 | 97 |
93 This page lists the C++ API for Pepper %(version)s. Apps that use this API can | 98 This page lists the C++ API for Pepper %(version)s. Apps that use this API can |
94 run in Chrome %(version)s or higher. | 99 run in Chrome %(version)s or higher. |
95 | 100 |
96 `Classes <pepper_%(channel)s/cpp/inherits.html>`__ | 101 `Classes <pepper_%(channel)s/cpp/inherits.html>`__ |
97 ================================================== | 102 ================================================== |
98 %(classes)s | 103 %(classes)s |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 return 0 | 269 return 0 |
265 | 270 |
266 | 271 |
267 if __name__ == '__main__': | 272 if __name__ == '__main__': |
268 try: | 273 try: |
269 rtn = main(sys.argv[1:]) | 274 rtn = main(sys.argv[1:]) |
270 except KeyboardInterrupt: | 275 except KeyboardInterrupt: |
271 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) | 276 sys.stderr.write('%s: interrupted\n' % os.path.basename(__file__)) |
272 rtn = 1 | 277 rtn = 1 |
273 sys.exit(rtn) | 278 sys.exit(rtn) |
OLD | NEW |