1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

make_readme: support .toml manifests

This commit is contained in:
Alexandre Aubin 2023-01-11 09:58:45 +01:00
parent a6cc66fd46
commit 73b070e084

View file

@ -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 ?!")
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"))