Skip to content

Commit 701a520

Browse files
committed
two cols
1 parent f567798 commit 701a520

File tree

2 files changed

+61
-64
lines changed

2 files changed

+61
-64
lines changed

scripts/echo_services_markdown.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _by_service_name(e: CaptureTuple):
4242
def generate_markdown_table(
4343
*catpured_files: Iterable[CaptureTuple],
4444
) -> str:
45-
title = ("service", "rest API", " ", "docker")
45+
title = ("Name", "Files", " ")
4646
lines = ["-" * 10] * len(title)
4747

4848
table = _to_row(title)
@@ -59,24 +59,22 @@ def generate_markdown_table(
5959
f"**{name.upper()}**",
6060
"",
6161
"",
62-
"",
6362
)
6463
)
6564
for _, file_path in service_files:
6665
linked_path = f"[{file_path}](./{file_path})"
6766

6867
# SEE https://shields.io/badges
69-
docker_badges = []
70-
openapi_badges = []
68+
badges = []
7169

7270
if file_path.stem.lower() == "dockerfile":
7371
repo = service_names_aliases.get(f"{name}") or name
74-
docker_badges = [
72+
badges = [
7573
f"[![Docker Image Size](https://img.shields.io/docker/image-size/itisfoundation/{repo})](https://hub.docker.com/r/itisfoundation/{repo}/tags)"
7674
]
7775

7876
elif file_path.stem.lower() == "openapi":
79-
openapi_badges = [
77+
badges = [
8078
f"[![ReDoc](https://img.shields.io/badge/OpenAPI-ReDoc-85ea2d?logo=openapiinitiative)]({_REDOC_URL_PREFIX}/{file_path}) "
8179
f"[![Swagger UI](https://img.shields.io/badge/OpenAPI-Swagger_UI-85ea2d?logo=swagger)]({_SWAGGER_URL_PREFIX}/{file_path})",
8280
]
@@ -85,8 +83,7 @@ def generate_markdown_table(
8583
(
8684
"",
8785
linked_path,
88-
" ".join(openapi_badges),
89-
" ".join(docker_badges),
86+
" ".join(badges),
9087
)
9188
)
9289

0 commit comments

Comments
 (0)