Draw posters from kept layers of licensed sources, credited on every picture

Esri's, Bing's and Google's terms forbid keeping or serving pictures made from their maps, so the posters move to
sources whose licence allows a kept copy: a picked Wikimedia Commons photo, USGS, PDOK and IGN's frozen 2021-2023
mosaic by country, else EOxCloudless's newest mosaic, and OpenStreetMap for the maps and the locator. What needs
the network is a layer fetched once and kept whole in layers/; texts, colours, size and format are drawn on every
request, and finished pictures are kept in posters/ up to 2 GB. Every picture carries its sources' credit line,
X-Credits, X-License (which follows its sources) and a link to /licences. Options are checked into a named 422;
the Kometa file states Jolpica's licence and versions its addresses so clients keep them for good. A layout whose
trace is a point (Madring) is drawn at the circuit's location instead of failing.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
2026-11-27 15:13:29 +01:00
parent 4f00403e13
commit db5c19f0d4
14 changed files with 1620 additions and 748 deletions
+4 -2
View File
@@ -11,14 +11,16 @@
# models it imports. Then the tests in tests/, which need the standard library only: every circuit in
# circuits/circuits.json carries one unique ergastId, and a race's circuit resolves by that id, never by
# its name; a failed Jolpica fetch is never kept, a season that is over is read from disk, a throttled
# request is asked again.
# request is asked again; a poster's options, keys, cache headers and store cap, its satellite source, credits and
# licence (poster_options.py and poster_sources.py, standard library only).
#
# **Said, never passed silently**: the service's dependencies (service/requirements.txt) are the image's to
# install, so the service is not started.
set -eu
# Parsed, not compiled to files: a check leaves the tree as it found it.
find cdn-api.py access_log.py circuits_service.py ergast_service.py posters_service.py models -name '*.py' -print0 |
find cdn-api.py access_log.py app_info.py circuits_service.py ergast_service.py posters_service.py poster_options.py \
poster_sources.py models -name '*.py' -print0 |
xargs -0 python3 -c 'import ast, sys
for f in sys.argv[1:]:
ast.parse(open(f, encoding="utf-8").read(), f)