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.

Story: 2006075
Task: 34809

Change-Id: I537aaea5c0e3341f8026589fc4b2c56505707ffb
This commit is contained in:
manchandavishal 2019-09-12 10:26:03 +00:00 committed by Vishal Manchanda
parent fb168515d9
commit 00aa16d41e
3 changed files with 26 additions and 12 deletions

View File

@ -5,4 +5,6 @@
openstackdocstheme>=1.30.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
reno>=2.5.0 # Apache-2.0

View File

@ -33,6 +33,7 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'openstackdocstheme',
'sphinxcontrib.rsvgconverter',
]
# Add any paths that contain templates here, relative to this directory.
@ -188,27 +189,28 @@ htmlhelp_basename = '%sdoc' % project
# -- Options for LaTeX output ---------------------------------------------
# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
latex_use_xindy = False
latex_domain_indices = False
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# NOTE: Specify toctree_only=True for a better document structure of
# the generated PDF file.
latex_documents = [
(
'index',
'%s.tex' % project,
u'%s Documentation' % project,
u'Objectif Libre',
'manual'
'doc-%s.tex' % project,
u'Cloudkitty-Dashboard Documentation',
u'OpenStack Foundation', 'howto', True
),
]

10
tox.ini
View File

@ -36,6 +36,16 @@ basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
whitelist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t cloudkittydashboard/tests {posargs}