add script for syncing docs

This commit is contained in:
2022-08-25 09:02:14 +02:00
parent f65f57fc57
commit 94f4df5276
6 changed files with 240 additions and 4 deletions

View File

@ -1,3 +1,4 @@
---
documents:
- html_location: docs/antiddos/api-ref
pdf_name: antiddos-api-ref
@ -956,6 +957,9 @@ services:
- repo: docs/elastic-cloud-server
type: gitea
environment: internal
- repo: opentelekomcloud-docs/elastic-cloud-server
type: github
environment: public
service_category: compute
service_title: Elastic Cloud Server
service_type: ecs
@ -993,7 +997,8 @@ services:
type: gitea
environment: internal
service_category: database
service_title: GaussDB Enterprise-class Distributed Database compatible with MySQL
service_title: |
GaussDB Enterprise-class Distributed Database compatible with MySQL
service_type: gaussdb_mysql
- repositories:
- environment: internal
@ -1063,7 +1068,8 @@ services:
repo: docs/gaussdb-opengauss
type: gitea
service_category: database
service_title: GaussDB Enterprise-grade Relational Database on the openGauss ecosystem
service_title: |
GaussDB Enterprise-grade Relational Database on the openGauss ecosystem
service_type: opengauss
- repositories:
- environment: internal

View File

@ -141,6 +141,17 @@ class Services(object):
res.append(res_doc)
return res
def docs_by_service_type(self, service_type):
"""List documents of the service
:param str service_type: Service type
:returns: generator for documents
"""
for doc in self.all_docs:
if doc["service_type"] != service_type:
continue
yield copy.deepcopy(doc)
def all_docs_full(self, environment):
"""Return list or documents with full service data
"""