Move list_builder.py to tools subdirectory

This commit is contained in:
Félix Piédallu 2024-02-07 15:04:55 +01:00
parent caf82f94cf
commit 1bc5b8862a
4 changed files with 6 additions and 6 deletions

View file

@ -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 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 them such as its category or maintenance state. This file is regularly read by
`list_builder.py` which publish the results on <https://app.yunohost.org/default>. `tools/list_builder.py` which publish the results on <https://app.yunohost.org/default>.
## Where can I learn about app packaging in YunoHost? ## Where can I learn about app packaging in YunoHost?

View file

@ -7,4 +7,4 @@ cd $workdir
date >> $log date >> $log
git pull &>/dev/null 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"

View file

@ -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) # 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 .. pushd ..
./list_builder.py ./tools/list_builder.py
popd popd
``` ```

View file

@ -15,12 +15,12 @@ from typing import Any, Generator, TextIO
import toml import toml
from git import Repo from git import Repo
from tools.packaging_v2.convert_v1_manifest_to_v2_for_catalog import \ from packaging_v2.convert_v1_manifest_to_v2_for_catalog import \
convert_v1_manifest_to_v2_for_catalog convert_v1_manifest_to_v2_for_catalog # pylint: disable=import-error
now = time.time() 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 # 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")) categories = toml.load((REPO_APPS_PATH / "categories.toml").open("r", encoding="utf-8"))