Merge Paris and Lille photo highlights

This commit is contained in:
2026-09-20 01:16:09 +03:30
parent a0e093b91a
commit afb4ed2676
25 changed files with 73 additions and 24 deletions
@@ -1,9 +1,10 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e"
date: "2026-09-19T21:36:37.329738+00:00" date: "2026-09-19T21:41:17+00:00"
categories: art categories: art
anchor: "Paris"
--- ---
<div id="photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e"></div>
<p><img src="/img/arts/uploads/85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e/00.jpg" alt="" loading="lazy"></p> <p><img src="/img/arts/uploads/85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e/00.jpg" alt="" loading="lazy"></p>
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-01" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-01"
date: "2026-09-19T21:36:36.329738+00:00" date: "2026-09-19T21:41:16+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-02" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-02"
date: "2026-09-19T21:36:35.329738+00:00" date: "2026-09-19T21:41:15+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-03" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-03"
date: "2026-09-19T21:36:34.329738+00:00" date: "2026-09-19T21:41:14+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-04" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-04"
date: "2026-09-19T21:36:33.329738+00:00" date: "2026-09-19T21:41:13+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-05" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-05"
date: "2026-09-19T21:36:32.329738+00:00" date: "2026-09-19T21:41:12+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-06" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-06"
date: "2026-09-19T21:36:31.329738+00:00" date: "2026-09-19T21:41:11+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-07" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-07"
date: "2026-09-19T21:36:30.329738+00:00" date: "2026-09-19T21:41:10+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-08" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-08"
date: "2026-09-19T21:36:29.329738+00:00" date: "2026-09-19T21:41:09+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-09" title: "photo-85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e-09"
date: "2026-09-19T21:36:28.329738+00:00" date: "2026-09-19T21:41:08+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f"
date: "2026-09-19T21:41:30.995462+00:00" date: "2026-09-19T21:41:30+00:00"
categories: art categories: art
anchor: "Paris & Lille" anchor: "Paris & Lille"
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-01" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-01"
date: "2026-09-19T21:41:29.995462+00:00" date: "2026-09-19T21:41:29+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-02" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-02"
date: "2026-09-19T21:41:28.995462+00:00" date: "2026-09-19T21:41:28+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-03" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-03"
date: "2026-09-19T21:41:27.995462+00:00" date: "2026-09-19T21:41:27+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-04" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-04"
date: "2026-09-19T21:41:26.995462+00:00" date: "2026-09-19T21:41:26+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-05" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-05"
date: "2026-09-19T21:41:25.995462+00:00" date: "2026-09-19T21:41:25+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-06" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-06"
date: "2026-09-19T21:41:24.995462+00:00" date: "2026-09-19T21:41:24+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-07" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-07"
date: "2026-09-19T21:41:23.995462+00:00" date: "2026-09-19T21:41:23+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-08" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-08"
date: "2026-09-19T21:41:22.995462+00:00" date: "2026-09-19T21:41:22+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-09" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-09"
date: "2026-09-19T21:41:21.995462+00:00" date: "2026-09-19T21:41:21+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-10" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-10"
date: "2026-09-19T21:41:20.995462+00:00" date: "2026-09-19T21:41:20+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-11" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-11"
date: "2026-09-19T21:41:19.995462+00:00" date: "2026-09-19T21:41:19+00:00"
categories: art categories: art
--- ---
@@ -1,7 +1,7 @@
--- ---
layout: post layout: post
title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-12" title: "photo-e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f-12"
date: "2026-09-19T21:41:18.995462+00:00" date: "2026-09-19T21:41:18+00:00"
categories: art categories: art
--- ---
+28
View File
@@ -110,6 +110,17 @@ collection_groups = [
), ),
] ]
paris = "85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e"
paris_lille = "e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f"
uploaded_highlight_groups = [
(
"Paris & Lille",
datetime(2026, 9, 19, 21, 41, 30, tzinfo=timezone.utc),
[(paris_lille, index) for index in range(13)] +
[(paris, index) for index in range(10)],
),
]
anchors = {armenia[0]: "Armenia", romania[0]: "Romania"} anchors = {armenia[0]: "Armenia", romania[0]: "Romania"}
captions = {(OLD[2], 7): "Transmission of Flesh by Erfan Ashourioun"} captions = {(OLD[2], 7): "Transmission of Flesh by Erfan Ashourioun"}
first_for_job = {} first_for_job = {}
@@ -159,4 +170,21 @@ for folder, group_start, anchor, filenames in collection_groups:
json.dumps(anchor) + "\n", 1) json.dumps(anchor) + "\n", 1)
path.write_text(content) path.write_text(content)
for anchor, group_start, photos in uploaded_highlight_groups:
for position, (job, index) in enumerate(photos):
path = ART / f"2026-09-19-photo-{job}-{index:02}.md"
content = path.read_text()
date = group_start - timedelta(seconds=position)
content = re.sub(r"^date:.*$", f'date: "{date.isoformat()}"', content,
count=1, flags=re.MULTILINE)
content = re.sub(r"^anchor:.*\n", "", content, flags=re.MULTILINE)
if position == 0:
content = content.replace("categories: art\n", "categories: art\nanchor: " +
json.dumps(anchor) + "\n", 1)
elif index == 0:
# Removing this batch's old highlight must not remove its published
# receipt target from the rendered gallery.
content = content.replace("---\n\n", f'---\n\n<div id="photo-{job}"></div>\n\n', 1)
path.write_text(content)
print("Organized all configured photo highlights into contiguous groups") print("Organized all configured photo highlights into contiguous groups")
+20
View File
@@ -65,6 +65,8 @@ COLLECTIONS = [
"Belfast_000512350018.jpg", "Belfast_000512350018.jpg",
]), ]),
] ]
PARIS = "85a558a3fcf582e6f0637d6927bb5a074de422f30a389ab9589630b9c163fc0e"
PARIS_LILLE = "e013523e4dda324d603c89f93ef3e83abbcd82cb11a16f85e53b670e8613d34f"
class PhotoHighlightTests(unittest.TestCase): class PhotoHighlightTests(unittest.TestCase):
@@ -106,6 +108,24 @@ class PhotoHighlightTests(unittest.TestCase):
self.assertEqual([filename for _, filename in records], filenames) self.assertEqual([filename for _, filename in records], filenames)
self.assertEqual(len({date for date, _ in records}), len(filenames)) self.assertEqual(len({date for date, _ in records}), len(filenames))
def test_paris_and_lille_is_one_contiguous_highlight(self):
records = []
anchors = []
for job, count in ((PARIS_LILLE, 13), (PARIS, 10)):
for index in range(count):
path = ART / f"2026-09-19-photo-{job}-{index:02}.md"
content = path.read_text()
date = re.search(r'^date: "([^"]+)"', content, re.MULTILINE)
records.append((datetime.fromisoformat(date.group(1)), job, index))
anchors.extend(re.findall(r'^anchor: "([^"]+)"', content, re.MULTILINE))
records.sort(reverse=True)
self.assertEqual([(job, index) for _, job, index in records],
[(PARIS_LILLE, index) for index in range(13)] +
[(PARIS, index) for index in range(10)])
self.assertEqual(anchors, ["Paris & Lille"])
former_paris = (ART / f"2026-09-19-photo-{PARIS}-00.md").read_text()
self.assertIn(f'<div id="photo-{PARIS}"></div>', former_paris)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()