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:
parent
0f6864b508
commit
00d3c293dc
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ def git_repo_age(path: Path) -> Union[bool, int]:
|
||||||
@cache
|
@cache
|
||||||
def get_catalog(apps_repo: Path | None = None, working_only: bool = False) -> dict[str, dict[str, Any]]:
|
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"""
|
"""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:
|
if working_only:
|
||||||
catalog = {
|
catalog = {
|
||||||
app: infos
|
app: infos
|
||||||
|
|
Loading…
Add table
Reference in a new issue