import sys
import os
import os.path

sys.path.append( "")

extensions = [
    "breathe",  # Doxygen-based C++ documentation gathering
    "sphinx.ext.todo",
    "sphinx.ext.autodoc",
    "sphinx.ext.mathjax"
    # "sphinx.ext.autosectionlabel"
]

# The suffix(es) of source filenames.
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'visr'
copyright = '2018, S3A'
author = 'S3A'

# Breathe (doxygen import library) configuration
# One way to try this is to autogenindex, which should automatically generate xml from a given source. I think.
# The default way we have at the moment is to let doxygen generate the xml, and use doxygenindex supply the rest. But I am not pointing to the correct directory.
breathe_projects = {"visr": "C:/Local/dev/gitlab-runner/builds/a913a013/0/s3a/VISR/build_py36/doc/doxygen/xml/" }

breathe_default_project = "visr"

# breathe_projects_source = {"visr": "C:/Local/dev/gitlab-runner/builds/a913a013/0/s3a/VISR/build_py36/doc/doxygen/xml/"}
# breathe_build_directory = {"visr": os.path.dirname("")}
# breathe_domain_by_extension = {"hpp" : "cpp","py": "py"}
# breathe_use_project_refids = True

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = 'classic'

# 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 = []

def setup(app):
  app.add_stylesheet('css/custom.css')

# .. doxygenclass:: PointSource
#    :project: visr

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
    'papersize': 'a4paper',
    'author': 'The S3A team',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    (master_doc, 'visr.tex', u'VISR User documentation',
     u'The S3A project team', 'manual'),
]
