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

get_catalog can be passed a path to an apps repo

This commit is contained in:
Salamandar 2024-08-13 11:16:21 +02:00
parent 0f6864b508
commit 00d3c293dc

View file

@ -38,7 +38,9 @@ def git_repo_age(path: Path) -> Union[bool, int]:
@cache
def get_catalog(apps_repo: Path | None = None, working_only: bool = False) -> dict[str, dict[str, Any]]:
"""Load the app catalog and filter out the non-working ones"""
catalog = toml.load((REPO_APPS_ROOT / "apps.toml").open("r", encoding="utf-8"))
apps_repo = apps_repo or REPO_APPS_ROOT
catalog = toml.load((apps_repo / "apps.toml").open("r", encoding="utf-8"))
if working_only:
catalog = {
app: infos