Descrizione inglese, copertine e licenza nel percorso ammesso
- store/: descrizione per lo store in inglese (titolo, riga breve, testo lungo), tre copertine 1200x630 e lo script che le ricompone col testo - le copertine nascono da sfondi generati senza scritte: il testo lo mette PIL, perche' i generatori di immagini sbagliano le lettere - licenza spostata in /usr/share/harbour-thinq/: Harbour ammette l'installazione solo in /usr/bin, /usr/share/applications, /usr/share/icons e /usr/share/<app>/ - il pacchetto ora installa SOLO in percorsi ammessi (verificato: 0 fuori norma) - README: copertina in testa
This commit is contained in:
1 parent
d51c38c420
commit
4d01db140b
12 files changed
+217
-5
No files matched your search
@@ -0,0 +1,50 @@
|
||||
# Materiale per lo store
|
||||
|
||||
Questa cartella raccoglie quello che serve per presentare l'app: la descrizione
|
||||
in inglese, le immagini di copertina e le istruzioni per la scheda.
|
||||
|
||||
| file | cos'è |
|
||||
|---|---|
|
||||
| `description.md` | titolo, riga breve e descrizione lunga in inglese, pronti da incollare nel modulo di Jolla Harbour |
|
||||
| `cover-a.jpg` | copertina su foto reale (lavanderia luminosa), 1200x630 |
|
||||
| `cover-b.jpg` | copertina illustrata (consigliata come principale: testo bianco su blu) |
|
||||
| `cover-c.jpg` | copertina calda, still life con cesto di biancheria |
|
||||
| `raw-*.jpg` | gli sfondi generati **senza testo**: servono per rifare una cover con altre parole |
|
||||
| `compose_cover.py` | riscrive le cover partendo dagli sfondi e sovrapponendo il testo con PIL |
|
||||
|
||||
## Perché il testo non lo scrive il generatore di immagini
|
||||
|
||||
I modelli di immagini sbagliano le lettere. Il titolo e le frasi sono composti
|
||||
dopo, con PIL e un font di sistema (`compose_cover.py`), sopra uno sfondo
|
||||
generato senza scritte: così il testo è sempre corretto e modificabile.
|
||||
|
||||
Per rifare le cover dopo aver cambiato titolo o frase:
|
||||
|
||||
```
|
||||
python3 compose_cover.py
|
||||
```
|
||||
|
||||
Il titolo si cambia in `TITLE`, la riga sotto in `CLAIM`.
|
||||
|
||||
## Cover e screenshot non sono la stessa cosa
|
||||
|
||||
Jolla Harbour **non ha un campo per la cover**: la scheda dell'app mostra
|
||||
l'icona (già dentro il pacchetto) e gli **screenshot**. Le cover di questa
|
||||
cartella servono per il README della repo, gli annunci e i post; gli screenshot
|
||||
per lo store vanno presi dal telefono, perché devono mostrare l'app vera.
|
||||
|
||||
Come prenderli, in un minuto:
|
||||
|
||||
1. Apri l'app sul telefono, con i dati già caricati.
|
||||
2. Volume giù + accensione insieme: lo screenshot finisce in Immagini.
|
||||
3. Ripeti per le schermate che vuoi mostrare: elenco macchine, dettaglio con
|
||||
tempo rimanente, impostazioni, dialog dello stop ritardato.
|
||||
4. Ritaglia la barra di stato se vuoi, e caricali nel modulo (1-5 immagini,
|
||||
formato verticale tipo 540x960, PNG o JPG).
|
||||
|
||||
## Dettaglio che lo store controlla
|
||||
|
||||
Harbour ammette l'installazione solo in `/usr/bin/<app>`,
|
||||
`/usr/share/applications/<app>.desktop`, `/usr/share/icons/hicolor/...` e
|
||||
`/usr/share/<app>/*`. La licenza sta quindi in `/usr/share/harbour-thinq/LICENSE`
|
||||
e non in `/usr/share/doc/`, che non è un percorso ammesso.
|
||||
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Compone le cover dello store sovrapponendo il testo alle immagini generate.
|
||||
|
||||
Il testo si scrive con PIL, non si delega al generatore: i modelli sbagliano le
|
||||
lettere. Le immagini raw restano come sfondo, il testo va nella metà sinistra
|
||||
che le tre varianti lasciano libera.
|
||||
"""
|
||||
from pathlib import Path
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
TITLE = "Thinq-like"
|
||||
CLAIM = "Your LG washing machine, from your phone"
|
||||
NOTE = "Sailfish OS \u00b7 straight to LG, no server in between"
|
||||
|
||||
FONT_DIR = Path("/usr/share/fonts/truetype/dejavu")
|
||||
BOLD = FONT_DIR / "DejaVuSans-Bold.ttf"
|
||||
REG = FONT_DIR / "DejaVuSans.ttf"
|
||||
|
||||
# variante -> colore del testo (immagine chiara = testo scuro, immagine blu = chiaro)
|
||||
VARIANTS = {
|
||||
"a": (16, 44, 74), # fotografia chiara
|
||||
"b": (255, 255, 255), # illustrazione blu
|
||||
"c": (26, 38, 32), # still life caldo
|
||||
}
|
||||
ACCENT = (26, 127, 158)
|
||||
|
||||
|
||||
def fit_font(draw, text, path, target_width, start=120, minimum=24):
|
||||
"""Rimpicciolisce il font finche' il testo sta nella larghezza data."""
|
||||
size = start
|
||||
while size > minimum:
|
||||
font = ImageFont.truetype(str(path), size)
|
||||
if draw.textlength(text, font=font) <= target_width:
|
||||
return font
|
||||
size -= 2
|
||||
return ImageFont.truetype(str(path), minimum)
|
||||
|
||||
|
||||
def compose(tag, color):
|
||||
src = HERE / f"raw-{tag}.jpg"
|
||||
if not src.exists():
|
||||
src = HERE / f"raw-{tag}.png"
|
||||
img = Image.open(src).convert("RGB")
|
||||
w, h = img.size
|
||||
draw = ImageDraw.Draw(img)
|
||||
margin = int(w * 0.06)
|
||||
limit = int(w * 0.48)
|
||||
|
||||
title_font = fit_font(draw, TITLE, BOLD, limit, start=104)
|
||||
claim_font = fit_font(draw, CLAIM, REG, limit, start=40)
|
||||
note_font = fit_font(draw, NOTE, REG, limit, start=28)
|
||||
|
||||
block = (title_font.size + 18 + claim_font.size + 22 + note_font.size)
|
||||
y = (h - block) // 2
|
||||
|
||||
# filetto d'accento sopra il titolo: da' un appiglio grafico al blocco
|
||||
draw.rectangle([margin, y - 28, margin + 64, y - 22], fill=ACCENT)
|
||||
|
||||
draw.text((margin, y), TITLE, font=title_font, fill=color)
|
||||
y += title_font.size + 18
|
||||
draw.text((margin, y), CLAIM, font=claim_font, fill=color)
|
||||
y += claim_font.size + 22
|
||||
draw.text((margin, y), NOTE, font=note_font, fill=color)
|
||||
|
||||
out = HERE / f"cover-{tag}.jpg"
|
||||
img.save(out, quality=92)
|
||||
print(f"{out.name} {w}x{h} {out.stat().st_size // 1024} KB")
|
||||
return out
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
for tag, color in VARIANTS.items():
|
||||
compose(tag, color)
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 133 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 186 KiB |
@@ -0,0 +1,78 @@
|
||||
# Store listing — English
|
||||
|
||||
Copy/paste text for the Jolla Harbour submission form.
|
||||
|
||||
## Title
|
||||
|
||||
```
|
||||
Thinq-like
|
||||
```
|
||||
|
||||
## Short description (one line)
|
||||
|
||||
```
|
||||
Check and control your LG washing machine from your Sailfish phone.
|
||||
```
|
||||
|
||||
## Long description
|
||||
|
||||
```
|
||||
Thinq-like talks straight to the LG ThinQ cloud from your phone. No bridge, no
|
||||
server of your own, nothing left running at home.
|
||||
|
||||
WHAT IT DOES
|
||||
|
||||
* Lists every washing machine and washer-dryer linked to your LG account, with
|
||||
the current phase, the time left and the cycle in progress.
|
||||
* Start, stop, switch off, wake the display, and set a delayed stop (3 to 19
|
||||
hours) — the only delay values these machines accept.
|
||||
* Sends a system notification when the wash is done, and picks it up again the
|
||||
next time you open the app if the cycle ended while it was closed.
|
||||
* Keeps the running machine on the home screen cover, so you get the time left
|
||||
at a glance.
|
||||
* Italian and English, following your phone language.
|
||||
|
||||
WHAT YOU NEED
|
||||
|
||||
* A Sailfish OS phone (tested on 5.1).
|
||||
* Your own LG ThinQ Personal Access Token. You create it once at
|
||||
connect-pat.lgthinq.com from a computer and paste it into the app.
|
||||
* The machine registered in the LG ThinQ app, with remote control enabled.
|
||||
|
||||
WHERE YOUR TOKEN GOES
|
||||
|
||||
The token never leaves your phone except to reach LG, and it is stored in the
|
||||
app's private configuration file. There are no analytics, no trackers and no
|
||||
server of ours involved. The app contains no credentials of its own: every user
|
||||
brings their own token.
|
||||
|
||||
WHAT IT DOES NOT DO
|
||||
|
||||
* No LG account name and password. Only tokens: the unofficial password method
|
||||
can get accounts blocked by LG, so this app does not offer it.
|
||||
* No wash program selection. The machine's own API does not expose it, so the
|
||||
program is still chosen on the machine.
|
||||
* No hidden background service. The app polls only while it is on screen (about
|
||||
every 45 seconds) and backs off by itself when LG reports too many requests.
|
||||
That is why the end-of-wash notification needs the app to be open when the
|
||||
cycle ends.
|
||||
|
||||
NOT AFFILIATED WITH LG
|
||||
|
||||
This is an independent project, not made, endorsed or approved by LG. ThinQ is
|
||||
a trademark of LG Electronics, cited here only to say which machines the app
|
||||
talks to, and the app shows the name Thinq-like to avoid any confusion. Licence:
|
||||
MIT. Source code available.
|
||||
```
|
||||
|
||||
## Notes for the submission form
|
||||
|
||||
* **Binary**: `harbour-thinq-<version>-1.aarch64.rpm`.
|
||||
* **Icon**: taken from the package (86, 108, 128, 172 px).
|
||||
* **Screenshots**: the store wants real screenshots. Take them on the phone
|
||||
(volume down + power), then crop away the status bar. Vertical, 540x960 or
|
||||
any phone-shaped size, PNG or JPG, at least one, up to five.
|
||||
* **Category**: Utility.
|
||||
* **Price**: free.
|
||||
* **Cover image**: `store/cover-b.jpg` in this folder, for the project page and
|
||||
announcements. The store form itself has no cover field.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
Reference in new issue
Block a user