pendify 0.1.8__tar.gz → 0.1.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pendify-0.1.8/src/pendify.egg-info → pendify-0.1.10}/PKG-INFO +3 -3
- {pendify-0.1.8 → pendify-0.1.10}/README.md +2 -2
- {pendify-0.1.8 → pendify-0.1.10}/pyproject.toml +1 -1
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/page.py +13 -27
- pendify-0.1.10/src/pendify/sponsor_art.py +2951 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/watcher.py +9 -1
- {pendify-0.1.8 → pendify-0.1.10/src/pendify.egg-info}/PKG-INFO +3 -3
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify.egg-info/SOURCES.txt +1 -0
- {pendify-0.1.8 → pendify-0.1.10}/LICENSE +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/MANIFEST.in +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/setup.cfg +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/__init__.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/__main__.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/alert.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/autostart.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/client.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/codes.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/config.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/icon.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/pairing.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/pendify.ico +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/plate_almena.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/qr.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/runfile.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/tray.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/update.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify/worker.py +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify.egg-info/dependency_links.txt +0 -0
- {pendify-0.1.8 → pendify-0.1.10}/src/pendify.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pendify
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: Pairs this PC with a phone account by a QR on a loopback page and sends it two kinds of alerts.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/ElkinDev/PendiFy
|
|
@@ -73,7 +73,7 @@ El botón de arriba a la derecha cambia entre el tema claro y el oscuro, y el pr
|
|
|
73
73
|
|
|
74
74
|
### Qué envía y a quién
|
|
75
75
|
|
|
76
|
-
Solo envía, al servicio de enlace de Pendi, el tipo de aviso (partida encontrada o partida empezada) junto con el identificador del enlace y el secreto de este PC, que viven en `%APPDATA%\pendify\config.json`. El servicio lo entrega a la cuenta que enlazaste. No envía tu nombre, tus partidas ni nada más del juego. Para saber cuándo empieza la partida lee el reloj del juego en este mismo PC, y no lo guarda ni lo envía. Si el juego no da su reloj, lee en su lugar el registro propio del juego en este mismo PC, solo la hora de dos clases de línea, y no guarda ni envía nada de él.
|
|
76
|
+
Solo envía, al servicio de enlace de Pendi, el tipo de aviso (partida encontrada o partida empezada) junto con el identificador del enlace y el secreto de este PC, que viven en `%APPDATA%\pendify\config.json`. El servicio lo entrega a la cuenta que enlazaste. No envía tu nombre, tus partidas ni nada más del juego. Para saber cuándo empieza la partida lee el reloj del juego en este mismo PC, y no lo guarda ni lo envía. Si el juego no da su reloj, lee en su lugar el registro propio del juego en este mismo PC, solo la hora de dos clases de línea, y no guarda ni envía nada de él. Una vez empezada la partida, pregunta al cliente del juego una vez cada cinco segundos, solo para ver cuándo termina.
|
|
77
77
|
|
|
78
78
|
### `--dry`
|
|
79
79
|
|
|
@@ -152,7 +152,7 @@ License: MIT
|
|
|
152
152
|
python -m pendify ping <kind>
|
|
153
153
|
|
|
154
154
|
The first loads the config, starts the page and opens it in the default browser, paired or not.
|
|
155
|
-
It also watches the game client on this PC: when a match is found it accepts after a short random delay, beeps, and sends the found-match alert; when the loading screen starts it beeps, and when the match itself starts it beeps and sends the started alert.
|
|
155
|
+
It also watches the game client on this PC: when a match is found it accepts after a short random delay, beeps, and sends the found-match alert; when the loading screen starts it beeps, and when the match itself starts it beeps and sends the started alert. Once the match has started it asks the game client once every five seconds, only to see the match end.
|
|
156
156
|
Add `--dry` to watch and alert without accepting. Add `--quiet` for the start by the system at logon, the line the start with Windows switch writes (`pythonw -m pendify --quiet`): it never opens the browser, a start that ends well shows no window, and a second quiet start prints `already running` and exits. One copy runs per config folder: a second start opens the page of the one that runs and exits. Ctrl+C stops the page and the watcher together.
|
|
157
157
|
The second sends one alert with the stored pair and prints one line with the answer.
|
|
158
158
|
|
|
@@ -57,7 +57,7 @@ El botón de arriba a la derecha cambia entre el tema claro y el oscuro, y el pr
|
|
|
57
57
|
|
|
58
58
|
### Qué envía y a quién
|
|
59
59
|
|
|
60
|
-
Solo envía, al servicio de enlace de Pendi, el tipo de aviso (partida encontrada o partida empezada) junto con el identificador del enlace y el secreto de este PC, que viven en `%APPDATA%\pendify\config.json`. El servicio lo entrega a la cuenta que enlazaste. No envía tu nombre, tus partidas ni nada más del juego. Para saber cuándo empieza la partida lee el reloj del juego en este mismo PC, y no lo guarda ni lo envía. Si el juego no da su reloj, lee en su lugar el registro propio del juego en este mismo PC, solo la hora de dos clases de línea, y no guarda ni envía nada de él.
|
|
60
|
+
Solo envía, al servicio de enlace de Pendi, el tipo de aviso (partida encontrada o partida empezada) junto con el identificador del enlace y el secreto de este PC, que viven en `%APPDATA%\pendify\config.json`. El servicio lo entrega a la cuenta que enlazaste. No envía tu nombre, tus partidas ni nada más del juego. Para saber cuándo empieza la partida lee el reloj del juego en este mismo PC, y no lo guarda ni lo envía. Si el juego no da su reloj, lee en su lugar el registro propio del juego en este mismo PC, solo la hora de dos clases de línea, y no guarda ni envía nada de él. Una vez empezada la partida, pregunta al cliente del juego una vez cada cinco segundos, solo para ver cuándo termina.
|
|
61
61
|
|
|
62
62
|
### `--dry`
|
|
63
63
|
|
|
@@ -136,7 +136,7 @@ License: MIT
|
|
|
136
136
|
python -m pendify ping <kind>
|
|
137
137
|
|
|
138
138
|
The first loads the config, starts the page and opens it in the default browser, paired or not.
|
|
139
|
-
It also watches the game client on this PC: when a match is found it accepts after a short random delay, beeps, and sends the found-match alert; when the loading screen starts it beeps, and when the match itself starts it beeps and sends the started alert.
|
|
139
|
+
It also watches the game client on this PC: when a match is found it accepts after a short random delay, beeps, and sends the found-match alert; when the loading screen starts it beeps, and when the match itself starts it beeps and sends the started alert. Once the match has started it asks the game client once every five seconds, only to see the match end.
|
|
140
140
|
Add `--dry` to watch and alert without accepting. Add `--quiet` for the start by the system at logon, the line the start with Windows switch writes (`pythonw -m pendify --quiet`): it never opens the browser, a start that ends well shows no window, and a second quiet start prints `already running` and exits. One copy runs per config folder: a second start opens the page of the one that runs and exits. Ctrl+C stops the page and the watcher together.
|
|
141
141
|
The second sends one alert with the stored pair and prints one line with the answer.
|
|
142
142
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pendify"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.10"
|
|
8
8
|
description = "Pairs this PC with a phone account by a QR on a loopback page and sends it two kinds of alerts."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -16,7 +16,7 @@ import time
|
|
|
16
16
|
import urllib.parse
|
|
17
17
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|
18
18
|
|
|
19
|
-
from . import codes, config, icon, plate_almena, qr, update
|
|
19
|
+
from . import codes, config, icon, plate_almena, qr, sponsor_art, update
|
|
20
20
|
|
|
21
21
|
ADDRESS = "127.0.0.1"
|
|
22
22
|
MAX_FORM_BYTES = 4096
|
|
@@ -719,32 +719,18 @@ def _mask(words):
|
|
|
719
719
|
f'{_MASK_GROUP * 3}</span>')
|
|
720
720
|
|
|
721
721
|
|
|
722
|
-
def
|
|
723
|
-
"""The sponsored QR
|
|
724
|
-
the
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
for y, row in enumerate(modules):
|
|
728
|
-
x = 0
|
|
729
|
-
while x < len(row):
|
|
730
|
-
if not row[x]:
|
|
731
|
-
x += 1
|
|
732
|
-
continue
|
|
733
|
-
start = x
|
|
734
|
-
while x < len(row) and row[x]:
|
|
735
|
-
x += 1
|
|
736
|
-
runs.append(f"M{start + qr.QUIET_ZONE} {y + qr.QUIET_ZONE}h{x - start}v1h-{x - start}z")
|
|
737
|
-
return "".join(runs), len(modules) + 2 * qr.QUIET_ZONE
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
_SPONSOR_RUNS, _SPONSOR_SIDE = _sponsor_runs()
|
|
722
|
+
def _pick_sponsor_style():
|
|
723
|
+
"""The style the sponsored QR is drawn in, picked again at every render of the linked page, one of
|
|
724
|
+
sponsor_art.STYLES at random (the standard random module: a cosmetic pick, as the mask's; owner 2026-10-03
|
|
725
|
+
20:1x). The one seam the tests replace."""
|
|
726
|
+
return random.choice(sponsor_art.STYLES)
|
|
741
727
|
|
|
742
728
|
|
|
743
|
-
def _sponsor_qr(words):
|
|
744
|
-
"""The sponsored QR:
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
f'height="
|
|
729
|
+
def _sponsor_qr(words, style):
|
|
730
|
+
"""The sponsored QR: the code of SPONSOR_ADDRESS in `style`, a picture of the app's own (sponsor_art.py: three
|
|
731
|
+
flat codes with the picture in the dots, two 3D stills), the same in both themes. `words` are escaped."""
|
|
732
|
+
return (f'<img class="qr2" src="{sponsor_art.data_uri(style)}" alt="{words["sponsor_qr"]}" width="264" '
|
|
733
|
+
f'height="264" data-style="{style}">')
|
|
748
734
|
|
|
749
735
|
|
|
750
736
|
def language(accept_language):
|
|
@@ -1014,8 +1000,8 @@ class PairingPage:
|
|
|
1014
1000
|
note = "" if snapshot["relinkOffered"] else f'<p class="note">{words["sponsor_note"]}</p>'
|
|
1015
1001
|
link.append(f'<aside class="side"><figure class="sponsor"><figcaption class="sponsor-by">'
|
|
1016
1002
|
f'{words["sponsor_by"]}</figcaption><div class="arcade"><i></i><i></i><i></i><i></i>'
|
|
1017
|
-
f'{_sponsor_qr(words)}</div><p class="sponsor-cap">
|
|
1018
|
-
f"</figure>{note}</aside>
|
|
1003
|
+
f'{_sponsor_qr(words, _pick_sponsor_style())}</div><p class="sponsor-cap">'
|
|
1004
|
+
f'{words["sponsor_cap"]}</p>{_PARTY}</figure>{note}</aside>')
|
|
1019
1005
|
typed = [f"<h2>{words['typed_title']}</h2>",
|
|
1020
1006
|
_form("typed", token, f'<label>{words["link_id_label"]} <input name="linkId" maxlength="32" '
|
|
1021
1007
|
f'autocomplete="off"></label><label>{words["secret_label"]} <input '
|