# Path: scripts/load_as_rst.py
# def convert(fname_in, fname_out=None, preamble=None, strict=False):
#     """
#     Converts an file at ``fname_in`` from a format understood by pypandoc
#     to ReStructuredText.
# 
#     :param fname_in:
#         Filename to read.
# 
#     :param fname_out:
#         Filename to write to - this will be overwritten. If unspecified,
#         the converted text is returned.
# 
#     :param preamble:
#         A preamble to add to the file (e.g. "#This is an auto-generated file")
#     """
#     if fname_in is None:
#         raise ValueError('Must specify an input file')
# 
#     if not os.path.exists(fname_in):
#         raise IOError('File not found: {}'.format(fname_in))
# 
#     text = preamble or ''
#     text = '\n'.join((text, load_text(fname_in, strict=strict)))
# 
#     if fname_out is not None:
#         with open(fname_out, 'w') as f:
#             print(text, file=f)
# 
#         return None         # Just being explicit
#     else:
#         return text


import sys
import os
from setuptools_scm import get_version
from scripts.load_as_rst import convert
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".

# Path: scripts/load_as_rst.py
# def convert(fname_in, fname_out=None, preamble=None, strict=False):
#     """
#     Converts an file at ``fname_in`` from a format understood by pypandoc
#     to ReStructuredText.
# 
#     :param fname_in:
#         Filename to read.
# 
#     :param fname_out:
#         Filename to write to - this will be overwritten. If unspecified,
#         the converted text is returned.
# 
#     :param preamble:
#         A preamble to add to the file (e.g. "#This is an auto-generated file")
#     """
#     if fname_in is None:
#         raise ValueError('Must specify an input file')
# 
#     if not os.path.exists(fname_in):
#         raise IOError('File not found: {}'.format(fname_in))
# 
#     text = preamble or ''
#     text = '\n'.join((text, load_text(fname_in, strict=strict)))
# 
#     if fname_out is not None:
#         with open(fname_out, 'w') as f:
#             print(text, file=f)
# 
#         return None         # Just being explicit
#     else:
#         return text


# Path: docs/source/conf.py
import sys
import os
from setuptools_scm import get_version
from scripts.load_as_rst import convert

# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".

html_static_path = ['_static']