Example #1
0
import matplotlib

matplotlib.use('Agg')

import msnoise.move2obspy
import sphinx_bootstrap_theme
import datetime
import click

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
from msnoise.default import default

grid = [ [key, default[key][0], default[key][1]] for key in default.keys() ]

numcolumns = len(grid[0])
colsizes = [max(len(r[i]) for r in grid) for i in range(numcolumns)]
formatter = ' '.join('{:<%d}' % c for c in colsizes)
rowsformatted = [formatter.format(*row) for row in grid]
headformatted = formatter.format(*['Parameter Name', 'Description', 'Default Value'])
header = formatter.format(*['=' * c for c in colsizes])

output = header +'\n' + headformatted +'\n' + header + '\n' + '\n'.join(rowsformatted) + '\n' + header

f = open('defaults.rst','w')
f.write(output)
f.close()

output = ""
Example #2
0
import matplotlib

matplotlib.use('Agg')

import msnoise.move2obspy
import msnoise.preprocessing
import sphinx_bootstrap_theme
import datetime
import click

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
from msnoise.default import default

grid = [[key, default[key][0], default[key][1]] for key in default.keys()]

numcolumns = len(grid[0])
colsizes = [max(len(r[i]) for r in grid) for i in range(numcolumns)]
formatter = ' '.join('{:<%d}' % c for c in colsizes)
rowsformatted = [formatter.format(*row) for row in grid]
headformatted = formatter.format(
    *['Parameter Name', 'Description', 'Default Value'])
header = formatter.format(*['=' * c for c in colsizes])

output = header + '\n' + headformatted + '\n' + header + '\n' + '\n'.join(
    rowsformatted) + '\n' + header

f = open('defaults.rst', 'w')
f.write(output)
f.close()
Example #3
0
import msnoise.move2obspy
import msnoise.preprocessing
# import sphinx_bootstrap_theme

os.environ["SPHINX_DOC_BUILD"] = "YES"

import datetime
import click

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
from msnoise.default import default

grid = [[key, default[key].default, default[key].definition]
        for key in default.keys()]

numcolumns = len(grid[0])
colsizes = [max(len(r[i]) for r in grid) for i in range(numcolumns)]
formatter = ' '.join('{:<%d}' % c for c in colsizes)
rowsformatted = [formatter.format(*row) for row in grid]
headformatted = formatter.format(
    *['Parameter Name', 'Description', 'Default Value'])
header = formatter.format(*['=' * c for c in colsizes])

output = header + '\n' + headformatted + '\n' + header + '\n' + '\n'.join(
    rowsformatted) + '\n' + header

with open('defaults.rst', 'w') as f:
    f.write(output)