Browse Source

Generate PDF documentation

This commit adds a new tox target to build PDF documentation.
It's a part of community goal, see storyboard for more
information.

Change-Id: I66add3b35283fdb6337b6dad9d79e852984d471f
Story: 2006078
Task: 34824
changes/43/682343/8
manchandavishal 2 years ago
committed by Vishal Manchanda
parent
commit
49b6c09bcd
  1. 2
      doc/requirements.txt
  2. 20
      doc/source/conf.py
  3. 13
      tox.ini

2
doc/requirements.txt

@ -0,0 +1,2 @@
openstackdocstheme>=1.30.0 # Apache-2.0
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

20
doc/source/conf.py

@ -23,7 +23,8 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
'openstackdocstheme'
'openstackdocstheme',
'sphinxcontrib.rsvgconverter',
]
# openstackdocstheme options
@ -73,10 +74,21 @@ htmlhelp_basename = '%sdoc' % project
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
'doc-designate-dashboard.tex',
u'Designate Dashboard Documentation',
u'OpenStack Foundation', 'manual', True),
]
latex_domain_indices = False
latex_elements = {
# Additional stuff for the LaTeX preamble.
# openany: Skip blank pages in generated PDFs
'extraclassoptions': 'openany,oneside',
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
}
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

13
tox.ini

@ -41,7 +41,18 @@ commands =
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
envdir = {toxworkdir}/docs
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[flake8]
# E123, E125 skipped as they are invalid PEP-8.

Loading…
Cancel
Save