|
92 | 92 | # |
93 | 93 | # This is also used if you do content translation via gettext catalogs. |
94 | 94 | # Usually you set "language" from the command line for these cases. |
95 | | -language = None |
| 95 | +language = 'en' |
96 | 96 |
|
97 | 97 | # List of patterns, relative to source directory, that match files and |
98 | 98 | # directories to ignore when looking for source files. |
99 | 99 | # This patterns also effect to html_static_path and html_extra_path |
100 | 100 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', |
101 | | - 'design_docs/template.md'] |
| 101 | + 'design_docs/template.md', 'design_docs/template.rst'] |
102 | 102 |
|
103 | 103 | # The name of the Pygments (syntax highlighting) style to use. |
104 | 104 | pygments_style = 'sphinx' |
|
131 | 131 | # Add any paths that contain custom static files (such as style sheets) here, |
132 | 132 | # relative to this directory. They are copied after the builtin static files, |
133 | 133 | # so a file named "default.css" will overwrite the builtin "default.css". |
134 | | -html_static_path = ['_static'] |
| 134 | +# html_static_path = ['_static'] |
135 | 135 |
|
136 | 136 |
|
137 | 137 | # -- Options for HTMLHelp output ------------------------------------------ |
|
201 | 201 | ('http://mpas-dev.github.io/MPAS-Tools/stable/', None)} |
202 | 202 |
|
203 | 203 |
|
| 204 | +cwd = os.getcwd() |
| 205 | +os.chdir('users_guide') |
| 206 | + |
204 | 207 | # Build some custom rst files |
205 | | -xmlFileName = '../mpas_analysis/obs/observational_datasets.xml' |
| 208 | +xmlFileName = '../../mpas_analysis/obs/observational_datasets.xml' |
206 | 209 | for component in ['ocean', 'seaice']: |
207 | | - build_rst_table_from_xml(xmlFileName, '{}_obs_table.rst'.format(component), |
| 210 | + build_rst_table_from_xml(xmlFileName, |
| 211 | + f'{component}_obs_table.rst', |
208 | 212 | component) |
209 | 213 |
|
210 | 214 | build_obs_pages_from_xml(xmlFileName) |
211 | 215 | build_quick_start() |
212 | 216 |
|
| 217 | +os.chdir(cwd) |
| 218 | + |
213 | 219 | for mdFileName in glob('design_docs/*.md'): |
| 220 | + if os.path.basename(mdFileName) == 'template.md': |
| 221 | + continue |
214 | 222 | output = m2r2.parse_from_file(mdFileName) |
215 | 223 | rstFileName = os.path.splitext(mdFileName)[0]+'.rst' |
216 | | - outFile = open(rstFileName, 'w') |
217 | | - outFile.write(output) |
| 224 | + with open(rstFileName, 'w') as outFile: |
| 225 | + outFile.write(output) |
218 | 226 |
|
219 | 227 | github_doc_root = 'https://github.com/rtfd/recommonmark/tree/master/doc/' |
0 commit comments