From 1bc5b8862a8d67b964ebf0805ad536b1d99c2b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 7 Feb 2024 15:04:55 +0100 Subject: [PATCH] Move list_builder.py to tools subdirectory --- README.md | 2 +- rebuild.sh | 2 +- store/README.md | 2 +- list_builder.py => tools/list_builder.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename list_builder.py => tools/list_builder.py (98%) diff --git a/README.md b/README.md index 3536467..7bfd625 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The catalog is stored in [**`apps.toml`**](./apps.toml) and is browsable here: It contains refences to the apps' repositories, along with a few metadata about them such as its category or maintenance state. This file is regularly read by -`list_builder.py` which publish the results on . +`tools/list_builder.py` which publish the results on . ## Where can I learn about app packaging in YunoHost? diff --git a/rebuild.sh b/rebuild.sh index bcbfb86..7c4780f 100644 --- a/rebuild.sh +++ b/rebuild.sh @@ -7,4 +7,4 @@ cd $workdir date >> $log git pull &>/dev/null -./list_builder.py &>> $log || sendxmpppy "[listbuilder] Rebuilding the application list failed miserably" +./tools/list_builder.py &>> $log || sendxmpppy "[listbuilder] Rebuilding the application list failed miserably" diff --git a/store/README.md b/store/README.md index c0c598d..6222f4e 100644 --- a/store/README.md +++ b/store/README.md @@ -19,7 +19,7 @@ curl https://app.yunohost.org/default/v3/apps.json > ../builds/default/v3/apps.j # You will also want to run list_builder.py to initialize the .apps_cache (at least for a few apps, you can Ctrl+C after a while) pushd .. - ./list_builder.py + ./tools/list_builder.py popd ``` diff --git a/list_builder.py b/tools/list_builder.py similarity index 98% rename from list_builder.py rename to tools/list_builder.py index 2b12fd2..1994f01 100755 --- a/list_builder.py +++ b/tools/list_builder.py @@ -15,12 +15,12 @@ from typing import Any, Generator, TextIO import toml from git import Repo -from tools.packaging_v2.convert_v1_manifest_to_v2_for_catalog import \ - convert_v1_manifest_to_v2_for_catalog +from packaging_v2.convert_v1_manifest_to_v2_for_catalog import \ + convert_v1_manifest_to_v2_for_catalog # pylint: disable=import-error now = time.time() -REPO_APPS_PATH = Path(__file__).parent +REPO_APPS_PATH = Path(__file__).parent.parent # Load categories and reformat the structure to have a list with an "id" key categories = toml.load((REPO_APPS_PATH / "categories.toml").open("r", encoding="utf-8"))