Add what apps replace, their phone apps and size choices (#39)
Three optional cottage.yml fields for plainer app pages and setup steps: - replaces: well-known services an app stands in for (77 apps) - mobile: the phone app's store links and server field (17 apps, links checked against the project's own pages and the stores) - sizes: named size choices for apps people size by what they keep (Immich, PhotoPrism, Nextcloud, Paperless-ngx, Audiobookshelf) Eight READMEs gain "Add people" and "Bring your data" sections for the setup checklist. CI now checks every cottage.yml against the schema.
This commit is contained in:
1 parent
717c64b43c
commit
6ace960a0b
92 files changed
+521
-30
No files matched your search
@@ -0,0 +1,20 @@
|
||||
"""Checks every recipe's cottage.yml against schema/cottage.schema.json. Hearth decodes the
|
||||
listing strictly, so anything the schema doesn't allow would stop the recipe syncing.
|
||||
Needs PyYAML and jsonschema."""
|
||||
import glob, json, sys
|
||||
|
||||
import jsonschema
|
||||
import yaml
|
||||
|
||||
schema = json.load(open("schema/cottage.schema.json"))
|
||||
validator = jsonschema.Draft202012Validator(schema)
|
||||
bad = []
|
||||
for path in sorted(glob.glob("apps/*/cottage.yml")):
|
||||
listing = yaml.safe_load(open(path))
|
||||
for err in validator.iter_errors(listing):
|
||||
where = "/".join(str(p) for p in err.absolute_path) or "(top)"
|
||||
bad.append(f"{path}: {where}: {err.message}")
|
||||
if listing.get("mobile") and not listing.get("mobile_apps"):
|
||||
bad.append(f"{path}: mobile needs mobile_apps: true")
|
||||
print("\n".join(bad) or "all listings OK")
|
||||
sys.exit(1 if bad else 0)
|
||||
@@ -49,6 +49,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- run: pip install --quiet jsonschema pyyaml
|
||||
- run: python3 .github/check-parameters.py
|
||||
- run: python3 .github/check-listings.py
|
||||
|
||||
# Cottage skips a recipe at sync time if its template runs an image the listing has no
|
||||
# digest for, so catch that here.
|
||||
|
||||
Reference in new issue
Block a user