Compare commits

..

1 Commits

Author SHA1 Message Date
c793c65c87 activate pdf for CSS service 2025-01-17 13:09:46 +00:00
15 changed files with 19 additions and 75 deletions

View File

@ -1,4 +1,5 @@
--- ---
environment: internal
hc_location: api-usage/guidelines hc_location: api-usage/guidelines
html_location: docs/apiu/guidelines html_location: docs/apiu/guidelines
link: /api-usage/guidelines/ link: /api-usage/guidelines/

View File

@ -1,5 +1,5 @@
--- ---
environment: public environment: internal
hc_location: api/asm hc_location: api/asm
html_location: docs/asm/api-ref html_location: docs/asm/api-ref
link: /application-service-mesh/api-ref/ link: /application-service-mesh/api-ref/

View File

@ -1,4 +1,5 @@
--- ---
environment: internal
hc_location: api/cfw hc_location: api/cfw
html_location: docs/cfw/api-ref html_location: docs/cfw/api-ref
link: /cloud-firewall/api-ref/ link: /cloud-firewall/api-ref/

View File

@ -1,4 +1,5 @@
--- ---
environment: internal
hc_location: usermanual/cfw hc_location: usermanual/cfw
html_location: docs/cfw/umn html_location: docs/cfw/umn
link: /cloud-firewall/umn/ link: /cloud-firewall/umn/

View File

@ -1,11 +0,0 @@
---
hc_location: api/das
environment: internal
html_location: docs/das/api-ref
link: /data-admin-service/api-ref/
pdf_enabled: true
pdf_environment: internal
rst_location: api-ref/source
service_type: das
title: API Reference
type: api-ref

View File

@ -1,11 +0,0 @@
---
hc_location: usermanual/das
environment: internal
html_location: docs/das/umn
link: /data-admin-service/umn/
pdf_enabled: true
pdf_environment: internal
rst_location: umn/source
service_type: das
title: User Guide
type: umn

View File

@ -1,5 +1,4 @@
--- ---
environment: internal
hc_location: api/dbss hc_location: api/dbss
html_location: docs/dbss/api-ref html_location: docs/dbss/api-ref
link: /database-security-service/api-ref/ link: /database-security-service/api-ref/

View File

@ -1,10 +1,10 @@
--- ---
hc_location: usermanual/aos hc_location: usermanual/aos
environment: public environment: internal
html_location: docs/rfs/umn html_location: docs/rfs/umn
link: /resource-formation-service/umn/ link: /resource-formation-service/umn/
pdf_environment: internal
pdf_enabled: true pdf_enabled: true
pdf_environment: internal
rst_location: umn/source rst_location: umn/source
service_type: rfs service_type: rfs
title: User Guide title: User Guide

View File

@ -1,5 +1,5 @@
--- ---
environment: hidden environment: internal
repositories: repositories:
- environment: internal - environment: internal
repo: docs/api-usage repo: docs/api-usage

View File

@ -1,5 +1,5 @@
--- ---
environment: public environment: internal
repositories: repositories:
- environment: internal - environment: internal
repo: docs/cloud-firewall repo: docs/cloud-firewall

View File

@ -1,16 +0,0 @@
---
environment: internal
repositories:
- environment: internal
repo: docs/data-admin-service
type: gitea
- environment: public
repo: opentelekomcloud-docs/data-admin-service
type: github
service_category: database
service_title: Data Admin Service
service_type: das
service_uri: data-admin-service
teams:
- name: docs-database-rw
permission: write

View File

@ -1,5 +1,5 @@
--- ---
environment: public environment: internal
repositories: repositories:
- environment: internal - environment: internal
repo: docs/resource-formation-service repo: docs/resource-formation-service
@ -7,7 +7,7 @@ repositories:
- environment: public - environment: public
repo: opentelekomcloud-docs/resource-formation-service repo: opentelekomcloud-docs/resource-formation-service
type: github type: github
service_category: md service_category: application
service_title: Resource Formation Service service_title: Resource Formation Service
service_type: rfs service_type: rfs
service_uri: resource-formation-service service_uri: resource-formation-service

View File

@ -44,7 +44,6 @@ commands =
{[testenv:json-{{ doc.type }}]commands} {[testenv:json-{{ doc.type }}]commands}
{%- endfor %} {%- endfor %}
{% if docs|length > 0 %}
[testenv:pdf-docs] [testenv:pdf-docs]
deps = deps =
{[testenv:docs]deps} {[testenv:docs]deps}
@ -58,7 +57,6 @@ 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
@ -69,7 +67,6 @@ commands =
{[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', '') %}
@ -110,6 +107,7 @@ 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_enabled -%}
# PDF version # PDF version
[testenv:{{ doc.type }}-pdf-docs] [testenv:{{ doc.type }}-pdf-docs]
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
@ -123,12 +121,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[0] $\{f/%gif/png\}; done || true" 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/*.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 LATEXMKOPTS="-interaction=nonstopmode" make -C {{ loc }}/build/pdf
mkdir -p doc/build/pdf mkdir -p doc/build/pdf
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/pdf/ cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/pdf/
cp {{ loc }}/build/pdf/{{ service_type }}-{{ doc.type }}.pdf doc/build/html/ {% endif %}
{% endfor %} {% endfor %}
[testenv:bindeps] [testenv:bindeps]

View File

@ -167,17 +167,8 @@ def process_repositories(args, service):
context["git_fqdn"] = git_fqdn context["git_fqdn"] = git_fqdn
if target_repo.get("type") != "github": if target_repo.get("type") != "github":
context["git_type"] = target_repo["type"] context["git_type"] = target_repo["type"]
if (args.target_environment == "public" if (args.target_environment == "internal"
and target_repo["repo"].split("/")[0] == "opentelekomcloud-docs-swiss"): and target_repo["repo"].split("/")[0] == "docs-swiss"):
context["html_options"] = dict(
logo_url="https://docs.sc.otc.t-systems.com",
)
elif (args.target_environment == "public"):
context["html_options"] = dict(
logo_url="https://docs.otc.t-systems.com",
)
elif (args.target_environment == "internal"
and target_repo["repo"].split("/")[0] == "docs-swiss"):
context["html_options"] = dict( context["html_options"] = dict(
disable_search=True, disable_search=True,
site_name="Internal Documentation Portal", site_name="Internal Documentation Portal",
@ -233,17 +224,8 @@ def process_repositories(args, service):
context["git_fqdn"] = git_fqdn context["git_fqdn"] = git_fqdn
if target_repo.get("type") != "github": if target_repo.get("type") != "github":
context["git_type"] = target_repo["type"] context["git_type"] = target_repo["type"]
if (args.target_environment == "public" if (args.target_environment == "internal"
and target_repo["repo"].split("/")[0] == "opentelekomcloud-docs-swiss"): and target_repo["repo"].split("/")[0] == "docs-swiss"):
context["html_options"] = dict(
logo_url="https://docs.sc.otc.t-systems.com",
)
elif (args.target_environment == "public"):
context["html_options"] = dict(
logo_url="https://docs.otc.t-systems.com",
)
elif (args.target_environment == "internal"
and target_repo["repo"].split("/")[0] == "docs-swiss"):
context["html_options"] = dict( context["html_options"] = dict(
disable_search=True, disable_search=True,
site_name="Internal Documentation Portal", site_name="Internal Documentation Portal",

View File

@ -20,6 +20,6 @@ commands = {posargs}
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.
show-source = True show-source = True
ignore = E123,E125,W503,E501 ignore = E123,E125,W503
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build