Add PDF generation support for Python-SearchlightClient
Add PDF generation, fix wrong tag on index.rst Change-Id: I1d0ba224ba1f0a0bd2157ccd45333f9a92871169 Signed-off-by: sonpn13 <sonpn13@viettel.com.vn> Story: #2006118 Task: #35498
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
openstackdocstheme>=1.30.0 # Apache-2.0
|
||||||
|
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD
|
||||||
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
|
||||||
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
|
||||||
|
@@ -29,7 +29,9 @@
|
|||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions
|
# extensions
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'openstackdocstheme']
|
extensions = ['sphinx.ext.autodoc',
|
||||||
|
'openstackdocstheme',
|
||||||
|
'sphinxcontrib.rsvgconverter']
|
||||||
|
|
||||||
autoclass_content = 'both'
|
autoclass_content = 'both'
|
||||||
|
|
||||||
@@ -191,13 +193,26 @@ htmlhelp_basename = 'python-searchlightclientdoc'
|
|||||||
# The font size ('10pt', '11pt' or '12pt').
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
#latex_font_size = '10pt'
|
#latex_font_size = '10pt'
|
||||||
|
|
||||||
|
latex_use_xindy = False
|
||||||
|
|
||||||
|
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}',
|
||||||
|
}
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title, author, documentclass [howto/manual])
|
# (source start file, target name, title, author, documentclass [howto/manual])
|
||||||
# .
|
# .
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'python-searchlightclient.tex',
|
('index', 'doc-python-searchlightclient.tex',
|
||||||
'python-searchlightclient Documentation',
|
'python-searchlightclient Documentation',
|
||||||
'OpenStack Foundation', 'manual'),
|
'OpenStack Foundation', 'manual', True),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
|
@@ -6,7 +6,7 @@ Code is hosted at `opendev.org`_. Submit bugs to the searchlight project
|
|||||||
on `Storyboard`_. Submit code to the openstack/python-searchlightclient project
|
on `Storyboard`_. Submit code to the openstack/python-searchlightclient project
|
||||||
using `Gerrit`_.
|
using `Gerrit`_.
|
||||||
|
|
||||||
.. _git.openstack.org: https://opendev.org/openstack/python-searchlightclient
|
.. _opendev.org: https://opendev.org/openstack/python-searchlightclient
|
||||||
.. _Storyboard: https://storyboard.openstack.org/#!/project_group/93
|
.. _Storyboard: https://storyboard.openstack.org/#!/project_group/93
|
||||||
.. _Gerrit: https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
.. _Gerrit: https://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||||
|
|
||||||
|
12
tox.ini
12
tox.ini
@@ -56,7 +56,17 @@ whitelist_externals =
|
|||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build --keep-going -b html doc/source doc/build/html
|
sphinx-build --keep-going -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]
|
[flake8]
|
||||||
ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238
|
ignore = E123,E126,E128,E241,E265,E713,H202,H405,H238
|
||||||
|
Reference in New Issue
Block a user