Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Portraits: Meitar CC BY 4.0 photos for Remez and Levin, and a CC BY path in commons_licences (refs #30) (#438)

agamrafaeli-instinct3689a3e8d61e
diff --git a/ASSETS.portraits.yaml b/ASSETS.portraits.yaml
index 0668e5271..6d938a6a0 100644
--- a/ASSETS.portraits.yaml
+++ b/ASSETS.portraits.yaml
@@ -1,5 +1,6 @@
# GENERATED by scripts/oss/commons_licences.py from content/people.yaml and Wikimedia Commons. Do not edit
-# by hand: re-run the script. A row is 'verified' only with an explicit US-status template.
+# by hand: re-run the script. A PD or CC0 row is 'verified' only with an explicit US-status template; a CC BY 4.0
+# row only with a Cc-by-4.0 template, a named artist and a NOTICE entry.
rules:
- glob: promo/ref/people/David_Ben-Gurion_NARA_1951.jpg
licence: Public-Domain
@@ -151,34 +152,30 @@ rules:
commons: Public domain; PD-Israel, PD-Israel/en, PD-Israel/layout, PD-Layout, PD-old-warning-text
artist: Teddy Brauner
note: no explicit US status template on the Commons page
-- glob: promo/ref/people/David_Remez.jpg
- licence: Public-Domain
- source: https://commons.wikimedia.org/wiki/File:David_Remez_(cropped).jpg
- status: owner-verify
- commons: Public domain; PD-Israel, PD-Israel/en, PD-Israel/layout, PD-Layout, PD-old-warning-text
- artist: Israeli GPO photographer
- note: no explicit US status template on the Commons page
+- glob: promo/ref/people/David_Remez_CCBY_1950.jpg
+ licence: CC-BY-4.0
+ source: https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg
+ status: verified
+ commons: CC BY 4.0; Cc-by-4.0, Cc-by-layout
+ artist: Boris Carmi
- glob: unity/Assets/UI/Portraits/remez.jpg
- licence: Public-Domain
- source: https://commons.wikimedia.org/wiki/File:David_Remez_(cropped).jpg
- status: owner-verify
- commons: Public domain; PD-Israel, PD-Israel/en, PD-Israel/layout, PD-Layout, PD-old-warning-text
- artist: Israeli GPO photographer
- note: no explicit US status template on the Commons page
-- glob: promo/ref/people/Yitzhak-Meir_Levin.jpg
- licence: Public-Domain
- source: https://commons.wikimedia.org/wiki/File:Yitzhak_Meir_Levin.jpg
- status: owner-verify
- commons: Public domain; PD-Israel, PD-Israel/en, PD-Israel/layout, PD-Layout, PD-old-warning-text
- artist: Théodore Brauner
- note: no explicit US status template on the Commons page
+ licence: CC-BY-4.0
+ source: https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg
+ status: verified
+ commons: CC BY 4.0; Cc-by-4.0, Cc-by-layout
+ artist: Boris Carmi
+- glob: promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg
+ licence: CC-BY-4.0
+ source: https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg
+ status: verified
+ commons: CC BY 4.0; Cc-by-4.0, Cc-by-layout
+ artist: Benno Rothenberg
- glob: unity/Assets/UI/Portraits/levin.jpg
- licence: Public-Domain
- source: https://commons.wikimedia.org/wiki/File:Yitzhak_Meir_Levin.jpg
- status: owner-verify
- commons: Public domain; PD-Israel, PD-Israel/en, PD-Israel/layout, PD-Layout, PD-old-warning-text
- artist: Théodore Brauner
- note: no explicit US status template on the Commons page
+ licence: CC-BY-4.0
+ source: https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg
+ status: verified
+ commons: CC BY 4.0; Cc-by-4.0, Cc-by-layout
+ artist: Benno Rothenberg
- glob: promo/ref/people/Zalman_Shazar_USGov_1966.jpg
licence: Public-Domain
source: https://commons.wikimedia.org/wiki/File:President_Lyndon_B._Johnson_with_President_Zalman_Shazar_of_Israel.jpg
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46f1f5bac..386bb5995 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB
## [Unreleased]
### Added
+- Portraits for Remez and Levin (refs #30): Government Press Office photographs, which Commons marks PD-Israel only, are replaced by Meitar Collection photographs (National Library of Israel, 1950 and 1949) under CC BY 4.0, cropped, with per-photo credits in `NOTICE`. `scripts/oss/commons_licences.py` now records an explicit Cc-by-4.0 file as `CC-BY-4.0` and marks it verified only with a named artist and a `NOTICE` entry; public domain, CC0 and the PD-Israel-only refusal are unchanged. Likeness check and the NLI confirmation before a paid release stay with the maintainer. Unity not run.
- The website (`site/`, refs #393): a static Astro site in English (`/en/`) and Hebrew (`/he/`, right to left) with Home, Play, History, Sources, Media, Devlog, Contributors, How we make it, Press, Contribute and Privacy. Every image and video carries a visible label (in-engine capture with build and date, AI-generated concept art, or AI cinematic promo, not gameplay); the History and Sources pages show the events and sources from `content/` as they are. The in-engine images are the README's screenshots, read from `docs/images/build-*.jpg` and described in `docs/images/captures.yaml`, so retaking them updates the site. The cinematic trailer is hosted as one 720p H.264 encode, shown behind a click with captions in its own labelled section after the gameplay; a real gameplay clip listed in `captures.yaml` becomes the home page's muted hero loop, with a pause button. Self-hosted fonts and images, no analytics, no cookies and nothing loaded from another site. A `Site` workflow builds and checks it on pull requests; deploying to GitHub Pages waits for the owner.
- The GDD v0.1 loop switch (`systems.loop` in eras.yaml, default `legacy`), its state (cities, units, objectives and score,
hashed only when set) and save schema 2, which names its ruleset: a game refuses a save made under another ruleset with a
diff --git a/LICENSING.md b/LICENSING.md
index e1df1cec0..c8cef4e8a 100644
--- a/LICENSING.md
+++ b/LICENSING.md
@@ -12,7 +12,7 @@ Different parts of this repository are under different licences. Where a file is
| AI-generated images | `promo/final/01`–`08`, `promo/ref/*-src.jpg`, `docs/images/hero-concept-1936.jpg`, `promo/start-screen/*.png`, `unity/Assets/UI/StartScreen/declaration-hall.jpg` | Marked [CC0 1.0](LICENSES/CC0-1.0.txt). No rights are claimed. Purely AI-generated output may not be copyrightable. Made with the ElevenLabs Image API (see `promo/CREDITS.md`), except the start screen's option images, made with Dreamina; the start screen's painting was made on ElevenLabs from a Dreamina option (`ASSETS.yaml`). |
| Quoted public-domain text | `docs/sources/declaration-1948/` | The Declaration of the Establishment of the State of Israel (1948): the Hebrew of the Official Gazette and the English translation. Public domain; sources in each file and in `ASSETS.yaml`. |
| In-engine captures | `promo/final/09`, `10`, `docs/images/build-*.jpg`, `docs/images/social-preview.jpg`, `spikes/m0/evidence/*.jpg`, `spikes/m0/evidence/*.txt` (logs) | CC BY 4.0. They show the Copernicus-derived terrain; see below. |
-| Portraits | `unity/Assets/UI/Portraits/`, `promo/ref/people/`, `promo/ref/*-sheet.jpg` | Public-domain photographs from Wikimedia Commons, plus one CC0 file (Moshe Dayan, 1962). Per-file sources are in `content/people.yaml` and `promo/CREDITS.md`. |
+| Portraits | `unity/Assets/UI/Portraits/`, `promo/ref/people/`, `promo/ref/*-sheet.jpg` | Public-domain photographs from Wikimedia Commons, CC0 files, and Meitar Collection photographs under CC BY 4.0 (credits in [NOTICE](NOTICE)). Per-file sources are in `content/people.yaml` and `promo/CREDITS.md`. |
| Event-card photographs | `unity/Assets/UI/EventImages/*.jpg` | Archival photographs from Wikimedia Commons, each under its own licence: CC BY 4.0 (Meitar Collection, National Library of Israel; credits in [NOTICE](NOTICE)), CC0 1.0 (Nationaal Archief) or public domain (US National Archives). All are adapted (graded and cropped). Per-file records in `ASSETS.yaml`; the mapping `event-images.yaml` beside them is CC BY 4.0 like the other UI assets. |
| Fonts | `unity/Assets/UI/Fonts/` | EB Garamond, [SIL Open Font License 1.1](unity/Assets/UI/Fonts/OFL.txt); Frank Ruhl Libre (`FrankRuhlLibre/`), [SIL Open Font License 1.1](unity/Assets/UI/Fonts/FrankRuhlLibre/OFL.txt) |
| Terrain heightmap | `unity/Assets/StreamingAssets/map/heightmap.*`, `content/map/hexes.json` (elevations) | Derived from Copernicus GLO-30 under the Copernicus DEM licence. Required notice: "produced using Copernicus WorldDEM-30 (c) DLR e.V. 2010-2014 and (c) Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved" |
diff --git a/NOTICE b/NOTICE
index 4d09e3575..339d5f1f4 100644
--- a/NOTICE
+++ b/NOTICE
@@ -43,7 +43,14 @@ and the Lebanon line the sub-district data's Mandate frontier; the Jordan map is
(only the agreements' line positions are taken); town coordinates for georeferencing from Wikidata (CC0)
and Wikipedia. Decision D-A.
-Portraits: public-domain and CC0 photographs from Wikimedia Commons; per-file records in ASSETS.portraits.yaml.
+Portraits: public-domain, CC0 and CC BY 4.0 photographs from Wikimedia Commons; per-file records in
+ASSETS.portraits.yaml. CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), Meitar Collection / National Library of
+Israel / The Pritzker Family National Photography Collection, via Wikimedia Commons; each is cropped and resized, nothing
+else changed:
+- remez.jpg: Boris Carmi, 1950, CC BY 4.0, cropped.
+ https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg
+- levin.jpg: Benno Rothenberg, 1949, CC BY 4.0, cropped.
+ https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg
Event-card photographs (unity/Assets/UI/EventImages/; per-file records in ASSETS.yaml). Each is adapted: graded and
cropped (shown in black and white with a navy-sepia tone, cropped and resized; nothing else changed).
diff --git a/content/people.yaml b/content/people.yaml
index e72e362ff..77e232c36 100644
--- a/content/people.yaml
+++ b/content/people.yaml
@@ -432,7 +432,7 @@ people:
party: mapai
competence: 7
loyalty: 8
- portrait: { file: promo/ref/people/David_Remez.jpg, license: Public domain, source: "https://commons.wikimedia.org/wiki/File:David_Remez_(cropped).jpg", focus_y: 0.38 }
+ portrait: { file: promo/ref/people/David_Remez_CCBY_1950.jpg, license: CC BY 4.0, source: "https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg", focus_y: 0.38 }
offices:
- { office: transportation_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }
- { office: transportation_minister, from: 1949-03-10, to: 1950-11-01, sources: *first }
@@ -451,7 +451,7 @@ people:
party: agudat_yisrael
competence: 6
loyalty: 6
- portrait: { file: promo/ref/people/Yitzhak-Meir_Levin.jpg, license: Public domain, source: "https://commons.wikimedia.org/wiki/File:Yitzhak_Meir_Levin.jpg", focus_y: 0.28 }
+ portrait: { file: promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg, license: CC BY 4.0, source: "https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg", focus_y: 0.41 }
offices:
- { office: welfare_minister, from: 1948-05-14, to: 1949-03-10, sources: *prov }
- { office: welfare_minister, from: 1949-03-10, to: 1950-11-01, party: united_religious_front, sources: *first }
diff --git a/promo/CREDITS.md b/promo/CREDITS.md
index 55b7a4171..9fcb1c07b 100644
--- a/promo/CREDITS.md
+++ b/promo/CREDITS.md
@@ -9,7 +9,8 @@ not final game art. Steam requires disclosure of AI-generated marketing assets.
Public domain: David Ben-Gurion (D597-087), Eliezer Kaplan, Moshe Sharett (Portrait), Haim-Moshe Shapira
(Moshe_Shapira.jpg), Yitzhak Gruenbaum (1948), Pinchas Rosen, Aharon Zisling, Mordechai Bentov,
Bechor-Shalom Sheetrit (Shitreet), Yehuda Leib Maimon, Peretz Bernstein, David Remez (cropped),
-Yitzhak Meir Levin.
+Yitzhak Meir Levin. The GPO photographs of Remez and Levin are still in promo/ref/cabinet-1948-sheet.jpg; their
+in-game portraits are replaced below.
CC0: "Moshe Dayan met mgr. A.C. Ramselaar (cropped).jpg" (1962).
## In-game portraits from US-safe sources (licence checked on 2026-10-11)
@@ -42,6 +43,18 @@ CC0: "Moshe Dayan met mgr. A.C. Ramselaar (cropped).jpg" (1962).
https://www.nationaalarchief.nl/onderzoeken/fotocollectie/aed665c6-d0b4-102d-bcf8-003048976d84
Collection Israel 1948-1949; archive date field 1948-01-01 conflicts with the caption identifying the
new state's foreign minister. No exact day is inferred. Old GPO likeness reference above remains unchanged.
+- David Remez: crop of Boris Carmi / Meitar Collection / National Library of Israel, 1950, CC BY 4.0
+ (attribution in NOTICE):
+ https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg
+ Identity: NLI record 997009452176205171, «פורטרט של חבר הכנסת מטעם מפא"י, דוד רמז.» (archive ARC. 4* 2069 / 24775).
+ Replaces the earlier Government Press Office photograph (PD-Israel only, no US status). Likeness check by the
+ maintainer still needed.
+- Yitzhak-Meir Levin: crop of Benno Rothenberg / Meitar Collection / National Library of Israel, 1949, CC BY 4.0
+ (attribution in NOTICE):
+ https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg
+ Identity: NLI record 997008137163805171, «יצחק מאיר לוין עובר על מסמכים במשרדו». The bearded man at the desk on the
+ right of a two-person photograph; he looks down at papers. Replaces the earlier Government Press Office photograph.
+ Likeness check by the maintainer still needed.
## Facts shown (verified 2026-10-09)
- Provisional Government (May 1948): 13 ministers and portfolios; Provisional State Council 37 members,
diff --git a/promo/ref/people/David_Remez.jpg b/promo/ref/people/David_Remez.jpg
deleted file mode 100644
index 84b9fae65..000000000
Binary files a/promo/ref/people/David_Remez.jpg and /dev/null differ
diff --git a/promo/ref/people/David_Remez_CCBY_1950.jpg b/promo/ref/people/David_Remez_CCBY_1950.jpg
new file mode 100644
index 000000000..cc5907f69
Binary files /dev/null and b/promo/ref/people/David_Remez_CCBY_1950.jpg differ
diff --git a/promo/ref/people/Yitzhak-Meir_Levin.jpg b/promo/ref/people/Yitzhak-Meir_Levin.jpg
deleted file mode 100644
index c72c5ea64..000000000
Binary files a/promo/ref/people/Yitzhak-Meir_Levin.jpg and /dev/null differ
diff --git a/promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg b/promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg
new file mode 100644
index 000000000..0bc0d5cf6
Binary files /dev/null and b/promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg differ
diff --git a/scripts/oss/commons_licences.py b/scripts/oss/commons_licences.py
index 04bc1aaa0..072236951 100644
--- a/scripts/oss/commons_licences.py
+++ b/scripts/oss/commons_licences.py
@@ -4,9 +4,10 @@
# ///
"""Write ASSETS.portraits.yaml: one provenance rule per portrait file, read from Wikimedia Commons (licence short name,
the licence templates on the file page, and the artist). A portrait is 'verified' only when it is public domain or
-CC0 AND its page carries an explicit US-status template (PD-Israel alone does not settle US copyright). Anything else
-is 'owner-verify'; a licence that is neither public domain nor CC0 is recorded as licence 'unknown', which the release
-gate refuses outright.
+CC0 AND its page carries an explicit US-status template (PD-Israel alone does not settle US copyright). A file whose page
+carries an explicit Cc-by-4.0 template and a named artist is recorded as CC-BY-4.0, 'verified' only when NOTICE also
+has an attribution entry for its Commons page (owner ruling, #30). Anything else is 'owner-verify'; a licence that is
+none of these is recorded as licence 'unknown', which the release gate refuses outright.
Usage: uv run scripts/oss/commons_licences.py (network: commons.wikimedia.org, read-only)"""
from __future__ import annotations
@@ -36,16 +37,23 @@ def _has_us_status(name: str) -> bool:
return name.startswith("PD-US") or name == "Cc-zero" or name in US_1996_TEMPLATES or name in US_EXPIRED_COMPOSITES
-def rule_for(path: str, source: str, licence_short: str, templates: list[str], artist: str) -> dict:
+def rule_for(path: str, source: str, licence_short: str, templates: list[str], artist: str,
+ attributed: bool = False) -> dict:
names = [t.removeprefix("Template:") for t in templates]
low = licence_short.lower()
+ cc_by = low == "cc by 4.0" and "Cc-by-4.0" in names
licence = "CC0-1.0" if low.startswith("cc0") else "Public-Domain" if low.startswith(("public domain", "pd")) \
- else "unknown"
+ else "CC-BY-4.0" if cc_by else "unknown"
rule = {"glob": path, "licence": licence, "source": source, "status": "verified",
"commons": f"{licence_short}; {', '.join(names)}",
"artist": re.sub(r"<[^>]+>", "", html.unescape(artist)).strip()}
if licence == "unknown":
- rule.update(status="owner-verify", note=f"Commons licence '{licence_short}' is not public domain or CC0")
+ rule.update(status="owner-verify", note=f"Commons licence '{licence_short}' is not public domain, CC0 or CC BY 4.0")
+ elif cc_by:
+ if not rule["artist"]:
+ rule.update(status="owner-verify", note="CC BY 4.0 needs a named artist for the attribution")
+ elif not attributed:
+ rule.update(status="owner-verify", note="CC BY 4.0 needs an attribution entry for this file in NOTICE")
elif any(n == "Not-PD-US-URAA" or n.startswith("Not-PD-US-URAA/") for n in names):
rule.update(status="owner-verify", note="Commons explicitly warns Not-PD-US-URAA: US copyright restored")
elif not any(_has_us_status(n) for n in names):
@@ -78,16 +86,18 @@ def main() -> int:
if (ROOT / built).exists():
pairs.append((built, portrait["source"]))
pairs += EXTRA
+ notice = (ROOT / "NOTICE").read_text(encoding="utf-8")
s = requests.Session()
s.headers.update(UA)
rules = []
for path, source in pairs:
title = "File:" + unquote(urlparse(source).path.rsplit("File:", 1)[1]).replace("_", " ")
short, templates, artist = _commons(title, s)
- rules.append(rule_for(path, source, short, templates, artist))
+ rules.append(rule_for(path, source, short, templates, artist, attributed=source in notice))
print(f"{rules[-1]['status']:13} {path} [{rules[-1]['commons']}]")
header = ("# GENERATED by scripts/oss/commons_licences.py from content/people.yaml and Wikimedia Commons. Do not edit\n"
- "# by hand: re-run the script. A row is 'verified' only with an explicit US-status template.\n")
+ "# by hand: re-run the script. A PD or CC0 row is 'verified' only with an explicit US-status template; a CC BY 4.0\n"
+ "# row only with a Cc-by-4.0 template, a named artist and a NOTICE entry.\n")
(ROOT / "ASSETS.portraits.yaml").write_text(
header + yaml.safe_dump({"rules": rules}, sort_keys=False, allow_unicode=True, width=120), encoding="utf-8")
return 0
diff --git a/scripts/oss/tests/test_commons_licences.py b/scripts/oss/tests/test_commons_licences.py
index 8c3c81d6d..5773a923f 100644
--- a/scripts/oss/tests/test_commons_licences.py
+++ b/scripts/oss/tests/test_commons_licences.py
@@ -21,7 +21,7 @@ def test_cc0_is_verified():
def test_share_alike_is_recorded_as_unknown_licence():
r = cl.rule_for("p/a.jpg", "s", "CC BY-SA 4.0", ["Template:Cc-by-sa-4.0"], "")
assert r["licence"] == "unknown" and r["status"] == "owner-verify"
- assert "not public domain or CC0" in r["note"]
+ assert "not public domain, CC0 or CC BY 4.0" in r["note"]
def test_explicit_us_restoration_warning_cannot_be_verified_by_nested_pd_text():
@@ -89,3 +89,33 @@ def test_plain_old_tag_and_composite_helpers_are_not_us_status():
def test_primary_us_tags_still_verify():
for tag in ("PD-US-expired", "PD-USGov", "PD-USGov-NARA", "PD-US-no notice"):
assert cl.rule_for("p/a.jpg", "s", "Public domain", ["Template:" + tag], "")["status"] == "verified"
+
+
+CC_BY = ["Template:Cc-by-4.0", "Template:Cc-by-layout"]
+
+
+def test_cc_by_with_artist_and_notice_entry_is_verified():
+ r = cl.rule_for("p/a.jpg", "s", "CC BY 4.0", CC_BY, "<a href='x'>Boris Carmi</a>", attributed=True)
+ assert r["licence"] == "CC-BY-4.0" and r["status"] == "verified" and r["artist"] == "Boris Carmi"
+ assert "note" not in r
+
+
+def test_cc_by_without_notice_entry_needs_the_owner():
+ r = cl.rule_for("p/a.jpg", "s", "CC BY 4.0", CC_BY, "Boris Carmi")
+ assert r["licence"] == "CC-BY-4.0" and r["status"] == "owner-verify" and "NOTICE" in r["note"]
+
+
+def test_cc_by_without_artist_needs_the_owner():
+ r = cl.rule_for("p/a.jpg", "s", "CC BY 4.0", CC_BY, "", attributed=True)
+ assert r["status"] == "owner-verify" and "artist" in r["note"]
+
+
+def test_cc_by_text_without_the_template_is_unknown():
+ r = cl.rule_for("p/a.jpg", "s", "CC BY 4.0", [], "Boris Carmi", attributed=True)
+ assert r["licence"] == "unknown" and r["status"] == "owner-verify"
+
+
+def test_cc_by_4_0_is_not_an_older_or_share_alike_version():
+ for short in ("CC BY 3.0", "CC BY-SA 4.0"):
+ r = cl.rule_for("p/a.jpg", "s", short, CC_BY, "Boris Carmi", attributed=True)
+ assert r["licence"] == "unknown"
diff --git a/tools/tests/test_meitar_portraits.py b/tools/tests/test_meitar_portraits.py
new file mode 100644
index 000000000..8b1f1fe04
--- /dev/null
+++ b/tools/tests/test_meitar_portraits.py
@@ -0,0 +1,68 @@
+"""The #30 batch (Remez, Levin): Meitar CC BY 4.0 portraits keep source, runtime, credit and licence record together."""
+from pathlib import Path
+import re
+
+from PIL import Image
+import yaml
+
+ROOT = Path(__file__).resolve().parents[2]
+BATCH = {
+ "remez": ("David_Remez_(997009452176205171).jpg", "promo/ref/people/David_Remez_CCBY_1950.jpg", 0.38, "Boris Carmi"),
+ "levin": ("Yitzhak-Meir_Levin_(997008137163805171).jpg", "promo/ref/people/Yitzhak-Meir_Levin_CCBY_1949.jpg", 0.41,
+ "Benno Rothenberg"),
+}
+PEOPLE = {p["id"]: p for p in yaml.safe_load((ROOT / "content/people.yaml").read_text(encoding="utf-8"))["people"]}
+RULES = yaml.safe_load((ROOT / "ASSETS.portraits.yaml").read_text(encoding="utf-8"))["rules"]
+
+
+def source(name):
+ return "https://commons.wikimedia.org/wiki/File:" + name
+
+
+def test_people_record_the_cc_by_source_file_and_focus():
+ for pid, (name, file, focus, _artist) in BATCH.items():
+ p = PEOPLE[pid]["portrait"]
+ assert (p["license"], p["source"], p["file"], p["focus_y"]) == ("CC BY 4.0", source(name), file, focus)
+
+
+def test_licence_rows_are_cc_by_and_verified_for_source_and_runtime():
+ for pid, (name, file, _focus, artist) in BATCH.items():
+ for path in (file, f"unity/Assets/UI/Portraits/{pid}.jpg"):
+ r = next(r for r in RULES if r["glob"] == path)
+ assert r["licence"] == "CC-BY-4.0" and r["status"] == "verified" and r["source"] == source(name)
+ assert r["artist"] == artist and "Cc-by-4.0" in r["commons"]
+
+
+def test_the_old_government_press_office_files_are_gone_from_the_rules():
+ gone = {"promo/ref/people/David_Remez.jpg", "promo/ref/people/Yitzhak-Meir_Levin.jpg"}
+ assert not gone & {r["glob"] for r in RULES}
+ assert not any((ROOT / g).exists() for g in gone)
+
+
+def test_runtime_is_the_source_crop_and_small():
+ for pid, (_name, file, _focus, _artist) in BATCH.items():
+ runtime = ROOT / f"unity/Assets/UI/Portraits/{pid}.jpg"
+ assert runtime.read_bytes() == (ROOT / file).read_bytes()
+ with Image.open(runtime) as image:
+ assert image.format == "JPEG" and image.height == 512 and 380 <= image.width <= 420
+
+
+def test_notice_credits_each_file_and_the_catalog_focus_matches():
+ notice = (ROOT / "NOTICE").read_text(encoding="utf-8")
+ catalog = (ROOT / "unity/Assets/UI/Portraits/PortraitCatalog.asset").read_text()
+ listing = (ROOT / "unity/Assets/UI/Portraits/PORTRAITS.txt").read_text()
+ for pid, (name, _file, focus, artist) in BATCH.items():
+ assert source(name) in notice and artist in notice
+ assert f"{pid} | CC BY 4.0 | {source(name)}\n" in listing
+ entry = re.search(rf" - personId: {pid}\n(.*?)(?= - personId:|\Z)", catalog, re.S).group(1)
+ assert f"focusY: {focus}" in entry
+
+
+def test_portraits_txt_header_matches_the_importer_and_order_matches_people_yaml():
+ importer = (ROOT / "unity/Assets/Editor/PortraitImport.cs").read_text(encoding="utf-8")
+ header = (ROOT / "unity/Assets/UI/Portraits/PORTRAITS.txt").read_text(encoding="utf-8").splitlines()[0]
+ assert f'new StringBuilder("{header}\\n")' in importer
+ order = [pid for pid, p in PEOPLE.items() if p.get("portrait") and p["portrait"].get("file")]
+ listed = [l.split(" | ")[0] for l in (ROOT / "unity/Assets/UI/Portraits/PORTRAITS.txt").read_text(encoding="utf-8").splitlines()[1:]]
+ catalog = re.findall(r" - personId: (\w+)", (ROOT / "unity/Assets/UI/Portraits/PortraitCatalog.asset").read_text())
+ assert listed == order and catalog == order
diff --git a/unity/Assets/Editor/PortraitImport.cs b/unity/Assets/Editor/PortraitImport.cs
index fd749b757..fbf828c9e 100644
--- a/unity/Assets/Editor/PortraitImport.cs
+++ b/unity/Assets/Editor/PortraitImport.cs
@@ -32,8 +32,8 @@ namespace Statecraft.Game.EditorTools
// Validate everything first, so a bad record leaves nothing half-imported.
foreach (var p in people)
{
- if (p.Portrait!.License != "Public domain" && p.Portrait.License != "CC0")
- throw new System.InvalidOperationException($"people.yaml: {p.Id} portrait licence '{p.Portrait.License}' is not public domain or CC0");
+ if (p.Portrait!.License != "Public domain" && p.Portrait.License != "CC0" && p.Portrait.License != "CC BY 4.0")
+ throw new System.InvalidOperationException($"people.yaml: {p.Id} portrait licence '{p.Portrait.License}' is not public domain, CC0 or CC BY 4.0");
var source = Path.Combine(Paths.RepoRoot, p.Portrait.File);
if (!File.Exists(source)) throw new FileNotFoundException($"people.yaml: {p.Id} portrait file missing", source);
}
@@ -53,7 +53,7 @@ namespace Statecraft.Game.EditorTools
foreach (var stale in Directory.GetFiles(Folder, "*.jpg").Select(f => f.Replace('\\', '/')).Where(f => !wanted.Contains(f)).ToList())
AssetDatabase.DeleteAsset(stale);
- var credits = new StringBuilder("# Portraits shipped in the build (copied from people.yaml portrait records; public domain only).\n");
+ var credits = new StringBuilder("# Portraits shipped in the build (copied from people.yaml portrait records; public domain, CC0 and CC BY 4.0 (attribution in NOTICE)).\n");
var catalog = AssetDatabase.LoadAssetAtPath<PortraitCatalog>(CatalogPath);
if (catalog == null) { catalog = ScriptableObject.CreateInstance<PortraitCatalog>(); AssetDatabase.CreateAsset(catalog, CatalogPath); }
catalog.entries.Clear();
diff --git a/unity/Assets/Scripts/UI/PortraitCatalog.cs b/unity/Assets/Scripts/UI/PortraitCatalog.cs
index e8f486539..75d716704 100644
--- a/unity/Assets/Scripts/UI/PortraitCatalog.cs
+++ b/unity/Assets/Scripts/UI/PortraitCatalog.cs
@@ -7,7 +7,7 @@ namespace Statecraft.Game.UI
{
/// <summary>Person id -> portrait texture (tech notes section 7): imported assets referenced from a scene object, so
/// they ship in the build's data file and need no runtime loading. Built by the editor tool PortraitImport from the
- /// public-domain files people.yaml names (portrait.file, licence and source recorded there).</summary>
+ /// public-domain, CC0 and CC BY 4.0 files people.yaml names (portrait.file, licence and source recorded there).</summary>
[CreateAssetMenu(menuName = "Statecraft/Portrait Catalog")]
public sealed class PortraitCatalog : ScriptableObject
{
diff --git a/unity/Assets/Tests/EditMode/PortraitImportTests.cs b/unity/Assets/Tests/EditMode/PortraitImportTests.cs
index 1341f0c40..be33e88c0 100644
--- a/unity/Assets/Tests/EditMode/PortraitImportTests.cs
+++ b/unity/Assets/Tests/EditMode/PortraitImportTests.cs
@@ -15,7 +15,7 @@ public class PortraitImportTests
const string Folder = "Assets/UI/Portraits";
static int ExpectedCount() => ContentLoader.Load(Paths.Content).People.Count(p => p.Portrait != null && p.Portrait.File != ""
- && (p.Portrait.License == "Public domain" || p.Portrait.License == "CC0"));
+ && (p.Portrait.License == "Public domain" || p.Portrait.License == "CC0" || p.Portrait.License == "CC BY 4.0"));
static void RunImport()
{
diff --git a/unity/Assets/UI/Portraits/PORTRAITS.txt b/unity/Assets/UI/Portraits/PORTRAITS.txt
index 6fc095d09..f1a488319 100644
--- a/unity/Assets/UI/Portraits/PORTRAITS.txt
+++ b/unity/Assets/UI/Portraits/PORTRAITS.txt
@@ -1,4 +1,4 @@
-# Portraits shipped in the build (copied from people.yaml portrait records; public domain only).
+# Portraits shipped in the build (copied from people.yaml portrait records; public domain, CC0 and CC BY 4.0 (attribution in NOTICE)).
ben_gurion | Public domain | https://commons.wikimedia.org/wiki/File:Photograph_of_President_Truman_in_the_Oval_Office%2C_evidently_receiving_a_Menorah_as_a_gift_from_the_Prime_Minister_of..._-_NARA_-_200318.jpg
zisling | Public domain | https://commons.wikimedia.org/wiki/File:Aharon_Zisling.jpg
kaplan | Public domain | https://commons.wikimedia.org/wiki/File:Eliezer_Kaplan.jpg
@@ -10,8 +10,8 @@ bentov | Public domain | https://commons.wikimedia.org/wiki/File:MordechaiBentov
sheetrit | Public domain | https://commons.wikimedia.org/wiki/File:Bechor-Shalom_Shitreet.jpg
maimon | Public domain | https://commons.wikimedia.org/wiki/File:Yehuda_Leib_Maimon.jpg
bernstein | Public domain | https://commons.wikimedia.org/wiki/File:Peretz_Bernstein.jpg
-remez | Public domain | https://commons.wikimedia.org/wiki/File:David_Remez_(cropped).jpg
-levin | Public domain | https://commons.wikimedia.org/wiki/File:Yitzhak_Meir_Levin.jpg
+remez | CC BY 4.0 | https://commons.wikimedia.org/wiki/File:David_Remez_(997009452176205171).jpg
+levin | CC BY 4.0 | https://commons.wikimedia.org/wiki/File:Yitzhak-Meir_Levin_(997008137163805171).jpg
shazar | Public domain | https://commons.wikimedia.org/wiki/File:President_Lyndon_B._Johnson_with_President_Zalman_Shazar_of_Israel.jpg
golda_meir | CC0 | https://commons.wikimedia.org/wiki/File:Golda_Meir%2C_minister_van_buitenlandse_zaken_van_Israel%2C_Bestanddeelnr_255-4314.jpg
weizmann | Public domain | https://commons.wikimedia.org/wiki/File:C._(Chaim)_Weizmann_LCCN2014712248.jpg
diff --git a/unity/Assets/UI/Portraits/PortraitCatalog.asset b/unity/Assets/UI/Portraits/PortraitCatalog.asset
index 1d9c1cf34..f5bcf8a15 100644
--- a/unity/Assets/UI/Portraits/PortraitCatalog.asset
+++ b/unity/Assets/UI/Portraits/PortraitCatalog.asset
@@ -51,7 +51,7 @@ MonoBehaviour:
focusY: 0.38
- personId: levin
image: {fileID: 2800000, guid: a90c09eb271424986af44b29de55f345, type: 3}
- focusY: 0.28
+ focusY: 0.41
- personId: shazar
image: {fileID: 2800000, guid: 5c3e41a28c9d45dd88bf15ce0b9b844f, type: 3}
focusY: 0.35
diff --git a/unity/Assets/UI/Portraits/levin.jpg b/unity/Assets/UI/Portraits/levin.jpg
index 7469f82d3..0bc0d5cf6 100644
Binary files a/unity/Assets/UI/Portraits/levin.jpg and b/unity/Assets/UI/Portraits/levin.jpg differ
diff --git a/unity/Assets/UI/Portraits/remez.jpg b/unity/Assets/UI/Portraits/remez.jpg
index 792c02a3e..cc5907f69 100644
Binary files a/unity/Assets/UI/Portraits/remez.jpg and b/unity/Assets/UI/Portraits/remez.jpg differ