helpgen: over Sphinx¶
configuration¶
pyquickhelper.helpgen.set_sphinx_variables
(fileconf, module_name, author, year, theme, theme_path, ext_locals, add_extensions = None, bootswatch_theme = ‘spacelab’, bootswatch_navbar_links = None, description_latex = ‘’, use_mathjax = False, use_lunrsearch = False, enable_disabled_parts = ‘enable_disabled_documented_pieces_of_code’, sharepost = ‘facebook-linkedin-twitter-20-body’, custom_style = None, extlinks = None, github_user = None, github_repo = None, title = None, book = True, link_resolve = None, nblayout = ‘classic’, doc_version = None, branch = ‘master’, callback_begin = None)
Defines variables for Sphinx.
conversion¶
pyquickhelper.helpgen.docstring2html
(function_or_string, format = ‘html’, fLOG = <function noLOG at 0x7f5f8e8804c0>, writer = ‘html’, keep_warnings = False, directives = None, language = ‘en’, layout = ‘docutils’, document_name = ‘<<string>>’, filter_nodes = None, options)
Converts a docstring into a HTML format.
pyquickhelper.helpgen.latex2rst
(input, output, encoding = ‘utf-8’, fLOG = <function noLOG at 0x7f5f8e8804c0>, temp_file = None)
convert a latex document into a rst document using pandoc
pyquickhelper.helpgen.rst2html
(s, fLOG = <function noLOG at 0x7f5f8e8804c0>, writer = ‘html’, keep_warnings = False, directives = None, language = ‘en’, layout = ‘docutils’, document_name = ‘<<string>>’, external_docnames = None, filter_nodes = None, new_extensions = None, update_builder = None, ret_doctree = False, destination = None, destination_path = None, options)
specific¶
pyquickhelper.helpgen.sphinx_main.generate_help_sphinx
(project_var_name, clean = False, root = ‘.’, filter_commit = <function <lambda> at 0x7f5fa0337ca0>, extra_ext = None, nbformats = (‘ipynb’, ‘slides’, ‘html’, ‘python’, ‘rst’, ‘pdf’, ‘github’), layout = None, module_name = None, from_repo = True, add_htmlhelp = False, copy_add_ext = None, direct_call = False, fLOG = <function fLOG at 0x7f5f8e880550>, parallel = 1, extra_paths = None, fexclude = None)
Runs the help generation:
copies every file in another folder,
replaces comments in doxygen format into rst format,
replaces local import by global import (tweaking sys.path too),
calls sphinx to generate the documentation.
tweaking zone¶
pyquickhelper.helpgen.sphinxm_custom_app.CustomSphinxApp
(self, srcdir, outdir, confdir = None, doctreedir = None, buildername = ‘html’, confoverrides = None, status = None, warning = None, freshenv = False, warningiserror = False, tags = None, copy_srcdir_to_tmpdir = False, create_new_srcdir = False, cleanup_on_errors = True, verbosity = 0, parallel = 0, extensions = ‘all’)