From 1e654991e95212863f0d55eb0847509c1c685d75 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 11 Jan 2023 09:58:45 +0100 Subject: [PATCH] make_readme: support .toml manifests --- README-generator/make_readme.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README-generator/make_readme.py b/README-generator/make_readme.py index cb65525..9788d89 100755 --- a/README-generator/make_readme.py +++ b/README-generator/make_readme.py @@ -2,6 +2,7 @@ import argparse import json +import toml import os import yaml from pathlib import Path @@ -25,7 +26,11 @@ def generate_READMEs(app_path: str): if not app_path.exists(): raise Exception("App path provided doesn't exists ?!") - manifest = json.load(open(app_path / "manifest.json")) + if os.path.exists(app_path / "manifest.json"): + manifest = json.load(open(app_path / "manifest.json")) + else: + manifest = toml.load(open(app_path / "manifest.toml")) + upstream = manifest.get("upstream", {}) catalog = json.load(open(Path(os.path.abspath(__file__)).parent.parent.parent / "apps.json"))