224 lines
6.7 KiB
Python
224 lines
6.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
import os
|
|
from git import Repo
|
|
|
|
project = 'Sphinx StoryMaker'
|
|
copyright = '2020, Kujiu'
|
|
author = 'Kujiu'
|
|
publisher = 'Nerv Project'
|
|
basename = 'sphinx-storymaker'
|
|
site_url = 'https://www.nerv-project.eu/'
|
|
repository_name = 'nerv-project/tools/'
|
|
repository_name += basename
|
|
vcs_uri = "https://procrastinator.nerv-project.eu/"
|
|
use_bibtex = False
|
|
|
|
repo = Repo(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..'))
|
|
repo.config_reader()
|
|
version = None
|
|
if not repo.head.is_detached:
|
|
version = repo.head.ref.name
|
|
release = version + ' [' + repo.commit().hexsha[:20] + ']'
|
|
|
|
repository_uri = vcs_uri + repository_name
|
|
issues_uri = repository_uri + "/issues/{issue}"
|
|
issues_pr_uri = repository_uri + "/merge_requests/{pr}"
|
|
issues_commit_uri = repository_uri + "/commit/{commit}"
|
|
issues_user_uri = vcs_uri + "/{user}"
|
|
|
|
needs_table_columns = "id;start;end;title;type;outgoing;tags;next"
|
|
needs_show_link_type = True
|
|
needs_show_link_title = True
|
|
needs_id_regex = "^[A-Za-z0-9_]*"
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
# If your documentation needs a minimal Sphinx version, state it here.
|
|
#
|
|
# needs_sphinx = '1.0'
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
# ones.
|
|
extensions = [
|
|
'sphinxcontrib.actdiag',
|
|
'sphinxcontrib.blockdiag',
|
|
'sphinxcontrib.nwdiag',
|
|
'sphinxcontrib.seqdiag',
|
|
'sphinxcontrib.bibtex',
|
|
'sphinx.ext.todo',
|
|
'sphinx_issues',
|
|
'sphinx_git',
|
|
'sphinx_sitemap',
|
|
]
|
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
|
templates_path = ['_templates']
|
|
|
|
# The suffix(es) of source filenames.
|
|
# You can specify multiple suffix as a list of string:
|
|
#
|
|
# source_suffix = ['.rst', '.md']
|
|
source_suffix = '.rst'
|
|
|
|
# The master toctree document.
|
|
master_doc = 'index'
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
# for a list of supported languages.
|
|
#
|
|
# This is also used if you do content translation via gettext catalogs.
|
|
# Usually you set "language" from the command line for these cases.
|
|
language = 'fr'
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
# directories to ignore when looking for source files.
|
|
# This pattern also affects html_static_path and html_extra_path .
|
|
exclude_patterns = []
|
|
|
|
# The name of the Pygments (syntax highlighting) style to use.
|
|
pygments_style = 'sphinx'
|
|
|
|
|
|
# -- 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 = 'scrolls'
|
|
|
|
# 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 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']
|
|
|
|
# Custom sidebar templates, must be a dictionary that maps document names
|
|
# to template names.
|
|
#
|
|
# The default sidebars (for documents that don't match any pattern) are
|
|
# defined by theme itself. Builtin themes are using these templates by
|
|
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
|
# 'searchbox.html']``.
|
|
#
|
|
# html_sidebars = {}
|
|
|
|
|
|
# -- Options for HTMLHelp output ---------------------------------------------
|
|
|
|
# Output file base name for HTML help builder.
|
|
htmlhelp_basename = basename
|
|
|
|
|
|
# -- Options for LaTeX output ------------------------------------------------
|
|
|
|
latex_engine = 'xelatex'
|
|
latex_toplevel_sectioning = 'part'
|
|
# latex_toplevel_sectioning = 'chapter'
|
|
latex_show_urls = 'footnote'
|
|
latex_elements = {
|
|
# 'figure_align': 'htbp',
|
|
# 'extraclassoptions': '',
|
|
'papersize': 'a4paper',
|
|
'pointsize': '12pt',
|
|
'extraclassoptions': 'twoside',
|
|
'fontpkg': r'''
|
|
\defaultfontfeatures{Ligatures=TeX}
|
|
\setmainfont{Linux Biolinum O}
|
|
\setsansfont{Linux Biolinum O}
|
|
'''
|
|
}
|
|
latex_show_pagerefs = True
|
|
|
|
# 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, basename + '.tex', project,
|
|
author, 'manual'),
|
|
]
|
|
|
|
# -- Options for manual page output ------------------------------------------
|
|
|
|
# One entry per manual page. List of tuples
|
|
# (source start file, name, description, authors, manual section).
|
|
man_pages = [
|
|
(master_doc, basename.lower(), project, [author], 1)
|
|
]
|
|
|
|
|
|
# -- Options for Texinfo output ----------------------------------------------
|
|
|
|
# Grouping the document tree into Texinfo files. List of tuples
|
|
# (source start file, target name, title, author,
|
|
# dir menu entry, description, category)
|
|
texinfo_documents = [
|
|
(master_doc, basename, project,
|
|
author, basename, '',
|
|
'Miscellaneous'),
|
|
]
|
|
|
|
|
|
# -- Options for Epub output -------------------------------------------------
|
|
|
|
# Bibliographic Dublin Core info.
|
|
epub_title = project
|
|
epub_author = author
|
|
epub_publisher = publisher
|
|
epub_copyright = copyright
|
|
|
|
# The unique identifier of the text. This can be a ISBN number
|
|
# or the project homepage.
|
|
#
|
|
# epub_identifier = ''
|
|
|
|
# A unique identification for the text.
|
|
#
|
|
# epub_uid = ''
|
|
|
|
# A list of files that should not be packed into the epub file.
|
|
epub_exclude_files = ['search.html']
|
|
epub_theme = 'epub'
|
|
epub_show_urls = 'footnote'
|
|
|
|
diag_antialias = True
|
|
diag_transparency = True
|
|
diag_html_image_format = "SVG"
|
|
diag_latex_image_format = "PDF"
|
|
diag_fontpath = os.path.dirname(os.path.realpath(__file__))
|
|
diag_fontpath = os.path.join(diag_fontpath, '_static', 'biolinumrah.ttf')
|
|
diag_debug = False
|
|
|
|
actdiag_antialias = diag_antialias
|
|
actdiag_transparency = diag_transparency
|
|
actdiag_html_image_format = diag_html_image_format
|
|
actdiag_latex_image_format = diag_latex_image_format
|
|
actdiag_fontpath = diag_fontpath
|
|
actdiag_debug = diag_debug
|
|
|
|
blockdiag_antialias = diag_antialias
|
|
blockdiag_transparency = diag_transparency
|
|
blockdiag_html_image_format = diag_html_image_format
|
|
blockdiag_fontpath = diag_fontpath
|
|
blockdiag_latex_image_format = diag_latex_image_format
|
|
blockdiag_debug = diag_debug
|
|
|
|
nwdiag_antialias = diag_antialias
|
|
nwdiag_transparency = diag_transparency
|
|
nwdiag_html_image_format = diag_html_image_format
|
|
nwdiag_latex_image_format = diag_latex_image_format
|
|
nwdiag_fontpath = diag_fontpath
|
|
nwdiag_debug = diag_debug
|
|
|
|
seqdiag_antialias = diag_antialias
|
|
seqdiag_transparency = diag_transparency
|
|
seqdiag_html_image_format = diag_html_image_format
|
|
seqdiag_latex_image_format = diag_latex_image_format
|
|
seqdiag_fontpath = diag_fontpath
|
|
seqdiag_debug = diag_debug
|