diff --git a/README.md b/README.md index 4ce3f10..06c476f 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,35 @@ One file per language, the file name being the code: Google uses language and re its own list (`en-US`, `it`, `de-DE`). Empty files are skipped. Apple takes no release notes for an app's first version; the action leaves them out and says so. +## Store listing + +Each app keeps its listing in its own repository, in the layout Google Play's tools read, so the same files serve +Google Play and F-Droid (`thepra/packages.arasaka.software` copies them into its F-Droid repository, mapping `it-IT` +to F-Droid's `it`): + +``` +fastlane/metadata/android/ + en-US/ + title.txt the name, up to 30 characters + short_description.txt up to 80 characters + full_description.txt up to 4,000 characters, plain text, "• " for a list + images/icon.png 512×512 + images/featureGraphic.png 1024×500, no alpha + images/phoneScreenshots/ 1.png …, 1080×1920, no alpha, in the order shown + it-IT/ the same; a missing image falls back to en-US +``` + +`listing/banner.py ` draws the banner (Google's feature graphic, the header of F-Droid's app page) for +an app named in `listing/banners.json`: its mark in a round seal, its name and its address between two hairlines, +in its own colours and typeface, at 1024×500 without alpha. Everything that matters sits in the middle, because +F-Droid trims a little off the top and bottom and puts its buttons over the top corners. It needs Python with Pillow and Chromium. +The marks are in `listing/marks/` (a mark may use `var(--accent)`, `var(--ink)` and `var(--well)`), the fonts in +`listing/fonts/`, each under the SIL Open Font License (`fonts/NOTICE.md`). + +```bash +python3 listing/banner.py meweb ../MeWeb/fastlane/metadata/android/en-US/images/featureGraphic.png +``` + ## Versions `v1` moves forward with every change that keeps the inputs working; a change that breaks them becomes `v2`. Pin a diff --git a/listing/banner.py b/listing/banner.py new file mode 100644 index 0000000..0826251 --- /dev/null +++ b/listing/banner.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +import argparse +import html +import json +import re +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + +HERE = Path(__file__).resolve().parent +WIDTH, HEIGHT = 1024, 500 +BROWSERS = ("chromium-browser", "chromium", "google-chrome", "google-chrome-stable") + +PAGE = """ +
+
{mark}
{name}
{line}
+""" + + +def browser(): + for name in BROWSERS: + found = shutil.which(name) + if found: + return found + sys.exit(f"none of {', '.join(BROWSERS)} is installed") + + +def page(spec): + mark = (HERE / spec["mark"]).read_text(encoding="utf-8") + mark = re.sub(r"^.*?(?= diff --git a/listing/marks/meweb.svg b/listing/marks/meweb.svg new file mode 100644 index 0000000..dd74926 --- /dev/null +++ b/listing/marks/meweb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/listing/marks/passolo.svg b/listing/marks/passolo.svg new file mode 100644 index 0000000..2ea3699 --- /dev/null +++ b/listing/marks/passolo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/listing/marks/simpleschool.svg b/listing/marks/simpleschool.svg new file mode 100644 index 0000000..02ad0da --- /dev/null +++ b/listing/marks/simpleschool.svg @@ -0,0 +1,13 @@ + + Scuola di lingua Cinese + + + + + + + + + + +