PDF changes for swiss
Some checks are pending
gl/check check status: pending (7e67003bf8f58812b4977097866bdbc368d10511)
Some checks are pending
gl/check check status: pending (7e67003bf8f58812b4977097866bdbc368d10511)
This commit is contained in:
parent
fc6fb59269
commit
7e67003bf8
@ -127,9 +127,13 @@ html_copy_source = False
|
|||||||
|
|
||||||
# -- Options for PDF output --------------------------------------------------
|
# -- Options for PDF output --------------------------------------------------
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
{%- if pdf_name is defined %}
|
{%- if doc_type %}
|
||||||
('index',
|
('index',
|
||||||
'{{ pdf_name }}.tex',
|
{%- if doc_type == 'dev' %}
|
||||||
|
'{{ service_type }}-dev-guide.tex',
|
||||||
|
{%- else %}
|
||||||
|
'{{ service_type }}-{{ doc_type }}.tex',
|
||||||
|
{% endif -%}
|
||||||
u'{{ title }}',
|
u'{{ title }}',
|
||||||
u'OpenTelekomCloud', 'manual'),
|
u'OpenTelekomCloud', 'manual'),
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
@ -13,6 +13,8 @@ commands = stestr run {posargs}
|
|||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
allowlist_externals =
|
||||||
|
doc8
|
||||||
commands =
|
commands =
|
||||||
doc8 doc/source README.rst
|
doc8 doc/source README.rst
|
||||||
|
|
||||||
@ -26,7 +28,7 @@ commands = {posargs}
|
|||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
-c https://raw.githubusercontent.com/opentelekomcloud-docs-swiss/docs-constraints/main/constraints.txt
|
-c https://raw.githubusercontent.com/opentelekomcloud-docs/docs-constraints/main/constraints.txt
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
mkdir
|
mkdir
|
||||||
cp
|
cp
|
||||||
@ -42,7 +44,8 @@ commands =
|
|||||||
{[testenv:json-{{ doc.type }}]commands}
|
{[testenv:json-{{ doc.type }}]commands}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
[testenv:docs-pdf]
|
{% if docs|length > 0 %}
|
||||||
|
[testenv:pdf-docs]
|
||||||
deps =
|
deps =
|
||||||
{[testenv:docs]deps}
|
{[testenv:docs]deps}
|
||||||
{[testenv:bindeps]deps}
|
{[testenv:bindeps]deps}
|
||||||
@ -55,16 +58,18 @@ allowlist_externals =
|
|||||||
cp
|
cp
|
||||||
commands =
|
commands =
|
||||||
mkdir -p doc/build/pdf
|
mkdir -p doc/build/pdf
|
||||||
|
mkdir -p doc/build/html
|
||||||
{[testenv:bindeps]commands}
|
{[testenv:bindeps]commands}
|
||||||
mkdir -p {toxinidir}/_templates
|
mkdir -p {toxinidir}/_templates
|
||||||
wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja
|
wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja
|
||||||
wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja
|
wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja
|
||||||
wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja
|
wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja
|
||||||
{%- for doc in docs %}
|
{%- for doc in docs %}
|
||||||
{%- if doc.pdf_name %}
|
{%- if doc.pdf_enabled %}
|
||||||
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for doc in docs -%}
|
{% for doc in docs -%}
|
||||||
{% set loc = doc.rst_location | replace('/source', '') %}
|
{% set loc = doc.rst_location | replace('/source', '') %}
|
||||||
@ -105,7 +110,6 @@ commands =
|
|||||||
cp -av doc/build/json/{{ doc.type }} {{ doc.type }}/build/json
|
cp -av doc/build/json/{{ doc.type }} {{ doc.type }}/build/json
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{% if doc.pdf_name -%}
|
|
||||||
# PDF version
|
# PDF version
|
||||||
[testenv:{{ doc.type }}-pdf-docs]
|
[testenv:{{ doc.type }}-pdf-docs]
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
@ -119,12 +123,12 @@ commands =
|
|||||||
rm -rf {{ loc }}/build/pdf
|
rm -rf {{ loc }}/build/pdf
|
||||||
cp -r {toxinidir}/_templates {{ loc }}/source/_templates/
|
cp -r {toxinidir}/_templates {{ loc }}/source/_templates/
|
||||||
sphinx-build -W --keep-going -b latex {{ loc }}/source {{ loc }}/build/pdf/
|
sphinx-build -W --keep-going -b latex {{ loc }}/source {{ loc }}/build/pdf/
|
||||||
bash -c "for f in {{ loc }}/build/pdf/*.gif; do convert $f $\{f/%gif/png\}; done || true"
|
bash -c "for f in {{ loc }}/build/pdf/*.gif; do convert $f[0] $\{f/%gif/png\}; done || true"
|
||||||
bash -c "for f in {{ loc }}/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
|
bash -c "for f in {{ loc }}/build/pdf/*.tex; do sed -iorig 's/\.gif//g' $f; done"
|
||||||
make -C {{ loc }}/build/pdf
|
make -C {{ loc }}/build/pdf LATEXMKOPTS="-interaction=nonstopmode"
|
||||||
mkdir -p doc/build/pdf
|
mkdir -p doc/build/pdf
|
||||||
cp {{ loc }}/build/pdf/{{ doc.pdf_name }}.pdf doc/build/pdf/
|
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/pdf/
|
||||||
{% endif %}
|
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/html/
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
[testenv:bindeps]
|
[testenv:bindeps]
|
||||||
|
@ -3,7 +3,14 @@
|
|||||||
merge-mode: squash-merge
|
merge-mode: squash-merge
|
||||||
default-branch: main
|
default-branch: main
|
||||||
templates:
|
templates:
|
||||||
- helpcenter-swiss-base-jobs
|
- helpcenter-base-jobs
|
||||||
|
vars:
|
||||||
|
sphinx_pdf_files:
|
||||||
|
{%- for doc in docs %}
|
||||||
|
{%- if doc.pdf_enabled %}
|
||||||
|
- {{ service_type }}-{{ doc.type }}.pdf
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- noop
|
- noop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user