Add Dresden Prague Tehran and Belfast highlights

This commit is contained in:
2026-09-20 00:53:38 +03:30
parent 2b90dccd83
commit 4364593529
46 changed files with 142 additions and 59 deletions
+52 -3
View File
@@ -44,6 +44,7 @@ collection_groups = [
"Bistoon_000521270027.jpg", "Bistoon_000521270026.jpg",
"Bistoon_000521270025.jpg", "Bazaar-e-Tabriz_000521270010.jpg",
"Bazaar-e-Tabriz_000521270009.jpg", "Bazaar-e-Tabriz_000521270008.jpg",
("dresden-prague-iran-2024", "Babataher.jpg"),
],
),
(
@@ -60,6 +61,53 @@ collection_groups = [
"Kazakhstan_DSC-0870.jpg", "Kazakhstan_DSC-0865.jpg",
],
),
(
"dresden-prague-iran-2024",
datetime(2024, 10, 9, 23, 50, 59, tzinfo=timezone.utc),
"Dresden & Berlin",
[
"x_000512370028.jpg", "x_000512370027.jpg", "x_000512370026.jpg",
"x_000512370024.jpg", "x_000512370022.jpg", "x_000512370013.jpg",
"x_000512350002.jpg", "x_000512350001.jpg",
"Let-me-tell-you-a-story_000512370015.jpg", "Dresden_000512370034.jpg",
"Dresden_000512370033.jpg", "Dresden_000512370032.jpg",
"Dresden_000512370019.jpg", "Dresden_000512370018.jpg",
"Dresden_000512370017.jpg", "Dresden_000512370016.jpg",
],
),
(
"dresden-prague-iran-2024",
datetime(2024, 10, 9, 23, 40, 59, tzinfo=timezone.utc),
"Iran - Tehran & Qom",
[
"Home_000512360003.jpg", "Somewhere-in-Tehran_2.jpg",
"Somewhere-in-Tehran.jpg", "Grandmother's-old-room.jpg",
],
),
(
"dresden-prague-iran-2024",
datetime(2024, 10, 9, 23, 30, 59, tzinfo=timezone.utc),
"Prague",
[
"x_000512370006.jpg", "x_000512370005.jpg", "x_000512370003.jpg",
"Prague_000512370012.jpg", "Prague_000512360031.jpg",
"Prague_000512360030.jpg", "Prague_000512360029.jpg",
"Prague_000512360027.jpg", "Prague_000512360021.jpg",
"Prague_000512360020.jpg", "Prague_000512360019.jpg",
],
),
(
"dresden-prague-iran-2024",
datetime(2024, 10, 9, 23, 20, 59, tzinfo=timezone.utc),
"Belfast & Tallaght",
[
"x_000512350014.jpg", "x_000512350012.jpg", "x_000512350011.jpg",
"x_000512350006.jpg", "x_000512350004.jpg", "x_000512350003.jpg",
"Bobby-Sands.jpg", "Belfast_000512350032.jpg",
"Belfast_000512350027.jpg", "Belfast_000512350026.jpg",
"Belfast_000512350022.jpg", "Belfast_000512350018.jpg",
],
),
]
anchors = {armenia[0]: "Armenia", romania[0]: "Romania"}
@@ -95,8 +143,9 @@ for position, (job, index) in enumerate(ordered):
target.write_text("\n".join(lines) + "\n")
for folder, group_start, anchor, filenames in collection_groups:
for position, filename in enumerate(filenames):
image = f"/img/arts/{folder}/{filename}"
for position, member in enumerate(filenames):
member_folder, filename = member if isinstance(member, tuple) else (folder, member)
image = f"/img/arts/{member_folder}/{filename}"
matches = [path for path in ART.glob("*.md") if image in path.read_text()]
assert len(matches) == 1, (image, matches)
path = matches[0]
@@ -110,4 +159,4 @@ for folder, group_start, anchor, filenames in collection_groups:
json.dumps(anchor) + "\n", 1)
path.write_text(content)
print("Organized Armenia, Romania, Iran, and Kazakhstan into contiguous highlights")
print("Organized all configured photo highlights into contiguous groups")