From 4364593529c398a13fd7b3d662b6617604b40263 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sun, 20 Sep 2026 00:53:38 +0330 Subject: [PATCH] Add Dresden Prague Tehran and Belfast highlights --- _art/2024-10-09-Babataher.md | 2 +- _art/2024-10-09-Belfast_000512350018.md | 2 +- _art/2024-10-09-Belfast_000512350022.md | 2 +- _art/2024-10-09-Belfast_000512350026.md | 2 +- _art/2024-10-09-Belfast_000512350027.md | 2 +- _art/2024-10-09-Belfast_000512350032.md | 2 +- _art/2024-10-09-Bobby-Sands.md | 2 +- _art/2024-10-09-Dresden_000512370016.md | 2 +- _art/2024-10-09-Dresden_000512370017.md | 2 +- _art/2024-10-09-Dresden_000512370018.md | 2 +- _art/2024-10-09-Dresden_000512370019.md | 2 +- _art/2024-10-09-Dresden_000512370032.md | 2 +- _art/2024-10-09-Dresden_000512370033.md | 2 +- _art/2024-10-09-Dresden_000512370034.md | 2 +- _art/2024-10-09-Grandmother's-old-room.md | 2 +- _art/2024-10-09-Home_000512360003.md | 3 +- ...09-Let-me-tell-you-a-story_000512370015.md | 2 +- _art/2024-10-09-Prague_000512360019.md | 2 +- _art/2024-10-09-Prague_000512360020.md | 2 +- _art/2024-10-09-Prague_000512360021.md | 2 +- _art/2024-10-09-Prague_000512360027.md | 2 +- _art/2024-10-09-Prague_000512360029.md | 2 +- _art/2024-10-09-Prague_000512360030.md | 2 +- _art/2024-10-09-Prague_000512360031.md | 2 +- _art/2024-10-09-Prague_000512370012.md | 2 +- _art/2024-10-09-Somewhere-in-Tehran.md | 2 +- _art/2024-10-09-Somewhere-in-Tehran_2.md | 2 +- _art/2024-10-09-x_000512350001.md | 2 +- _art/2024-10-09-x_000512350002.md | 2 +- _art/2024-10-09-x_000512350003.md | 2 +- _art/2024-10-09-x_000512350004.md | 2 +- _art/2024-10-09-x_000512350006.md | 2 +- _art/2024-10-09-x_000512350011.md | 2 +- _art/2024-10-09-x_000512350012.md | 2 +- _art/2024-10-09-x_000512350014.md | 3 +- _art/2024-10-09-x_000512370003.md | 2 +- _art/2024-10-09-x_000512370005.md | 2 +- _art/2024-10-09-x_000512370006.md | 3 +- _art/2024-10-09-x_000512370013.md | 2 +- _art/2024-10-09-x_000512370022.md | 2 +- _art/2024-10-09-x_000512370024.md | 2 +- _art/2024-10-09-x_000512370026.md | 2 +- _art/2024-10-09-x_000512370027.md | 2 +- _art/2024-10-09-x_000512370028.md | 3 +- scripts/organize-photo-highlights.py | 55 ++++++++++++++++++- scripts/tests/test_photo_highlights.py | 54 ++++++++++++++---- 46 files changed, 142 insertions(+), 59 deletions(-) diff --git a/_art/2024-10-09-Babataher.md b/_art/2024-10-09-Babataher.md index f6fc6be..58e92ce 100644 --- a/_art/2024-10-09-Babataher.md +++ b/_art/2024-10-09-Babataher.md @@ -1,7 +1,7 @@ --- layout: post title: Babataher.jpg -date: 2024-10-09 +date: "2024-10-25T23:59:39+00:00" categories: art --- diff --git a/_art/2024-10-09-Belfast_000512350018.md b/_art/2024-10-09-Belfast_000512350018.md index 2204f0c..8374eff 100644 --- a/_art/2024-10-09-Belfast_000512350018.md +++ b/_art/2024-10-09-Belfast_000512350018.md @@ -1,7 +1,7 @@ --- layout: post title: Belfast_000512350018.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:48+00:00" categories: art --- diff --git a/_art/2024-10-09-Belfast_000512350022.md b/_art/2024-10-09-Belfast_000512350022.md index 93409de..2a6005e 100644 --- a/_art/2024-10-09-Belfast_000512350022.md +++ b/_art/2024-10-09-Belfast_000512350022.md @@ -1,7 +1,7 @@ --- layout: post title: Belfast_000512350022.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:49+00:00" categories: art --- diff --git a/_art/2024-10-09-Belfast_000512350026.md b/_art/2024-10-09-Belfast_000512350026.md index 53f72ee..55a3fb1 100644 --- a/_art/2024-10-09-Belfast_000512350026.md +++ b/_art/2024-10-09-Belfast_000512350026.md @@ -1,7 +1,7 @@ --- layout: post title: Belfast_000512350026.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:50+00:00" categories: art --- diff --git a/_art/2024-10-09-Belfast_000512350027.md b/_art/2024-10-09-Belfast_000512350027.md index 48feb16..95bf432 100644 --- a/_art/2024-10-09-Belfast_000512350027.md +++ b/_art/2024-10-09-Belfast_000512350027.md @@ -1,7 +1,7 @@ --- layout: post title: Belfast_000512350027.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:51+00:00" categories: art --- diff --git a/_art/2024-10-09-Belfast_000512350032.md b/_art/2024-10-09-Belfast_000512350032.md index 62415d1..bd96e74 100644 --- a/_art/2024-10-09-Belfast_000512350032.md +++ b/_art/2024-10-09-Belfast_000512350032.md @@ -1,7 +1,7 @@ --- layout: post title: Belfast_000512350032.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:52+00:00" categories: art --- diff --git a/_art/2024-10-09-Bobby-Sands.md b/_art/2024-10-09-Bobby-Sands.md index 1649bdb..9657bbc 100644 --- a/_art/2024-10-09-Bobby-Sands.md +++ b/_art/2024-10-09-Bobby-Sands.md @@ -1,7 +1,7 @@ --- layout: post title: Bobby-Sands.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:53+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370016.md b/_art/2024-10-09-Dresden_000512370016.md index ae1251e..a969c73 100644 --- a/_art/2024-10-09-Dresden_000512370016.md +++ b/_art/2024-10-09-Dresden_000512370016.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370016.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:44+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370017.md b/_art/2024-10-09-Dresden_000512370017.md index ea70931..d0255b8 100644 --- a/_art/2024-10-09-Dresden_000512370017.md +++ b/_art/2024-10-09-Dresden_000512370017.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370017.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:45+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370018.md b/_art/2024-10-09-Dresden_000512370018.md index c4b802f..c14b8bb 100644 --- a/_art/2024-10-09-Dresden_000512370018.md +++ b/_art/2024-10-09-Dresden_000512370018.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370018.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:46+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370019.md b/_art/2024-10-09-Dresden_000512370019.md index 74ffccd..cee7221 100644 --- a/_art/2024-10-09-Dresden_000512370019.md +++ b/_art/2024-10-09-Dresden_000512370019.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370019.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:47+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370032.md b/_art/2024-10-09-Dresden_000512370032.md index 2b62dfc..e10c3eb 100644 --- a/_art/2024-10-09-Dresden_000512370032.md +++ b/_art/2024-10-09-Dresden_000512370032.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370032.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:48+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370033.md b/_art/2024-10-09-Dresden_000512370033.md index 9d9c8b9..00de598 100644 --- a/_art/2024-10-09-Dresden_000512370033.md +++ b/_art/2024-10-09-Dresden_000512370033.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370033.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:49+00:00" categories: art --- diff --git a/_art/2024-10-09-Dresden_000512370034.md b/_art/2024-10-09-Dresden_000512370034.md index 2b2ea1c..6f7791a 100644 --- a/_art/2024-10-09-Dresden_000512370034.md +++ b/_art/2024-10-09-Dresden_000512370034.md @@ -1,7 +1,7 @@ --- layout: post title: Dresden_000512370034.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:50+00:00" categories: art --- diff --git a/_art/2024-10-09-Grandmother's-old-room.md b/_art/2024-10-09-Grandmother's-old-room.md index 84c1da2..04cfa24 100644 --- a/_art/2024-10-09-Grandmother's-old-room.md +++ b/_art/2024-10-09-Grandmother's-old-room.md @@ -1,7 +1,7 @@ --- layout: post title: Grandmother's-old-room.jpg -date: 2024-10-09 +date: "2024-10-09T23:40:56+00:00" categories: art --- diff --git a/_art/2024-10-09-Home_000512360003.md b/_art/2024-10-09-Home_000512360003.md index fd94366..125e43f 100644 --- a/_art/2024-10-09-Home_000512360003.md +++ b/_art/2024-10-09-Home_000512360003.md @@ -1,8 +1,9 @@ --- layout: post title: Home_000512360003.jpg -date: 2024-10-09 +date: "2024-10-09T23:40:59+00:00" categories: art +anchor: "Iran - Tehran & Qom" --- ![Home](/img/arts/dresden-prague-iran-2024/Home_000512360003.jpg) diff --git a/_art/2024-10-09-Let-me-tell-you-a-story_000512370015.md b/_art/2024-10-09-Let-me-tell-you-a-story_000512370015.md index 6cb1fdb..80ae709 100644 --- a/_art/2024-10-09-Let-me-tell-you-a-story_000512370015.md +++ b/_art/2024-10-09-Let-me-tell-you-a-story_000512370015.md @@ -1,7 +1,7 @@ --- layout: post title: Let-me-tell-you-a-story_000512370015.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:51+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360019.md b/_art/2024-10-09-Prague_000512360019.md index 184d7e0..b8b285a 100644 --- a/_art/2024-10-09-Prague_000512360019.md +++ b/_art/2024-10-09-Prague_000512360019.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360019.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:49+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360020.md b/_art/2024-10-09-Prague_000512360020.md index cf7d191..a0b335d 100644 --- a/_art/2024-10-09-Prague_000512360020.md +++ b/_art/2024-10-09-Prague_000512360020.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360020.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:50+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360021.md b/_art/2024-10-09-Prague_000512360021.md index ab4c495..781dd2d 100644 --- a/_art/2024-10-09-Prague_000512360021.md +++ b/_art/2024-10-09-Prague_000512360021.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360021.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:51+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360027.md b/_art/2024-10-09-Prague_000512360027.md index 6f3ef76..f7fe8c4 100644 --- a/_art/2024-10-09-Prague_000512360027.md +++ b/_art/2024-10-09-Prague_000512360027.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360027.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:52+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360029.md b/_art/2024-10-09-Prague_000512360029.md index a32b625..7391fd7 100644 --- a/_art/2024-10-09-Prague_000512360029.md +++ b/_art/2024-10-09-Prague_000512360029.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360029.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:53+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360030.md b/_art/2024-10-09-Prague_000512360030.md index dface09..4808132 100644 --- a/_art/2024-10-09-Prague_000512360030.md +++ b/_art/2024-10-09-Prague_000512360030.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360030.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:54+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512360031.md b/_art/2024-10-09-Prague_000512360031.md index 991df3a..262eb55 100644 --- a/_art/2024-10-09-Prague_000512360031.md +++ b/_art/2024-10-09-Prague_000512360031.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512360031.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:55+00:00" categories: art --- diff --git a/_art/2024-10-09-Prague_000512370012.md b/_art/2024-10-09-Prague_000512370012.md index 998252a..83b88f5 100644 --- a/_art/2024-10-09-Prague_000512370012.md +++ b/_art/2024-10-09-Prague_000512370012.md @@ -1,7 +1,7 @@ --- layout: post title: Prague_000512370012.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:56+00:00" categories: art --- diff --git a/_art/2024-10-09-Somewhere-in-Tehran.md b/_art/2024-10-09-Somewhere-in-Tehran.md index 3926ce6..b26ee15 100644 --- a/_art/2024-10-09-Somewhere-in-Tehran.md +++ b/_art/2024-10-09-Somewhere-in-Tehran.md @@ -1,7 +1,7 @@ --- layout: post title: Somewhere-in-Tehran.jpg -date: 2024-10-09 +date: "2024-10-09T23:40:57+00:00" categories: art --- diff --git a/_art/2024-10-09-Somewhere-in-Tehran_2.md b/_art/2024-10-09-Somewhere-in-Tehran_2.md index 5bc1fbe..aff83ef 100644 --- a/_art/2024-10-09-Somewhere-in-Tehran_2.md +++ b/_art/2024-10-09-Somewhere-in-Tehran_2.md @@ -1,7 +1,7 @@ --- layout: post title: Somewhere-in-Tehran_2.jpg -date: 2024-10-09 +date: "2024-10-09T23:40:58+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350001.md b/_art/2024-10-09-x_000512350001.md index 745fb34..fa7ca52 100644 --- a/_art/2024-10-09-x_000512350001.md +++ b/_art/2024-10-09-x_000512350001.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350001.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:52+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350002.md b/_art/2024-10-09-x_000512350002.md index 98eeb95..198a522 100644 --- a/_art/2024-10-09-x_000512350002.md +++ b/_art/2024-10-09-x_000512350002.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350002.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:53+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350003.md b/_art/2024-10-09-x_000512350003.md index 6c6622d..065d761 100644 --- a/_art/2024-10-09-x_000512350003.md +++ b/_art/2024-10-09-x_000512350003.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350003.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:54+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350004.md b/_art/2024-10-09-x_000512350004.md index 521bca7..ecd94e6 100644 --- a/_art/2024-10-09-x_000512350004.md +++ b/_art/2024-10-09-x_000512350004.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350004.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:55+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350006.md b/_art/2024-10-09-x_000512350006.md index dd8042c..696a855 100644 --- a/_art/2024-10-09-x_000512350006.md +++ b/_art/2024-10-09-x_000512350006.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350006.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:56+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350011.md b/_art/2024-10-09-x_000512350011.md index 2588869..fc6846c 100644 --- a/_art/2024-10-09-x_000512350011.md +++ b/_art/2024-10-09-x_000512350011.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350011.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:57+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350012.md b/_art/2024-10-09-x_000512350012.md index 043ef63..3564aa2 100644 --- a/_art/2024-10-09-x_000512350012.md +++ b/_art/2024-10-09-x_000512350012.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512350012.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:58+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512350014.md b/_art/2024-10-09-x_000512350014.md index 06047be..2409c67 100644 --- a/_art/2024-10-09-x_000512350014.md +++ b/_art/2024-10-09-x_000512350014.md @@ -1,8 +1,9 @@ --- layout: post title: x_000512350014.jpg -date: 2024-10-09 +date: "2024-10-09T23:20:59+00:00" categories: art +anchor: "Belfast & Tallaght" --- ![x](/img/arts/dresden-prague-iran-2024/x_000512350014.jpg) diff --git a/_art/2024-10-09-x_000512370003.md b/_art/2024-10-09-x_000512370003.md index 897f8a0..5b87ffa 100644 --- a/_art/2024-10-09-x_000512370003.md +++ b/_art/2024-10-09-x_000512370003.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370003.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:57+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370005.md b/_art/2024-10-09-x_000512370005.md index bda9d20..cbe9c2f 100644 --- a/_art/2024-10-09-x_000512370005.md +++ b/_art/2024-10-09-x_000512370005.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370005.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:58+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370006.md b/_art/2024-10-09-x_000512370006.md index 904fc57..f6d4782 100644 --- a/_art/2024-10-09-x_000512370006.md +++ b/_art/2024-10-09-x_000512370006.md @@ -1,8 +1,9 @@ --- layout: post title: x_000512370006.jpg -date: 2024-10-09 +date: "2024-10-09T23:30:59+00:00" categories: art +anchor: "Prague" --- ![x](/img/arts/dresden-prague-iran-2024/x_000512370006.jpg) diff --git a/_art/2024-10-09-x_000512370013.md b/_art/2024-10-09-x_000512370013.md index f67f255..5d607cc 100644 --- a/_art/2024-10-09-x_000512370013.md +++ b/_art/2024-10-09-x_000512370013.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370013.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:54+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370022.md b/_art/2024-10-09-x_000512370022.md index d17441a..43859fb 100644 --- a/_art/2024-10-09-x_000512370022.md +++ b/_art/2024-10-09-x_000512370022.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370022.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:55+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370024.md b/_art/2024-10-09-x_000512370024.md index b838eb1..49e3c35 100644 --- a/_art/2024-10-09-x_000512370024.md +++ b/_art/2024-10-09-x_000512370024.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370024.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:56+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370026.md b/_art/2024-10-09-x_000512370026.md index 1ba7fb8..b6762ae 100644 --- a/_art/2024-10-09-x_000512370026.md +++ b/_art/2024-10-09-x_000512370026.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370026.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:57+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370027.md b/_art/2024-10-09-x_000512370027.md index 65af459..7694a88 100644 --- a/_art/2024-10-09-x_000512370027.md +++ b/_art/2024-10-09-x_000512370027.md @@ -1,7 +1,7 @@ --- layout: post title: x_000512370027.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:58+00:00" categories: art --- diff --git a/_art/2024-10-09-x_000512370028.md b/_art/2024-10-09-x_000512370028.md index bbad5e0..17c1dfa 100644 --- a/_art/2024-10-09-x_000512370028.md +++ b/_art/2024-10-09-x_000512370028.md @@ -1,8 +1,9 @@ --- layout: post title: x_000512370028.jpg -date: 2024-10-09 +date: "2024-10-09T23:50:59+00:00" categories: art +anchor: "Dresden & Berlin" --- ![x](/img/arts/dresden-prague-iran-2024/x_000512370028.jpg) diff --git a/scripts/organize-photo-highlights.py b/scripts/organize-photo-highlights.py index f1b57b8..40b6d88 100644 --- a/scripts/organize-photo-highlights.py +++ b/scripts/organize-photo-highlights.py @@ -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") diff --git a/scripts/tests/test_photo_highlights.py b/scripts/tests/test_photo_highlights.py index 0ce89fb..8cd1880 100644 --- a/scripts/tests/test_photo_highlights.py +++ b/scripts/tests/test_photo_highlights.py @@ -14,8 +14,8 @@ ROMANIA = [f"/img/arts/uploads/{JOB}/{index:02}.jpg" for index in (0, 1)] + [ for index in range(5)] + [ "/img/arts/uploads/260cc99527c13f256d4ea39d0959f5daa942c888ea882852e73fd94f6c30b7db/00.jpg", "/img/arts/uploads/b18a2f1c7127077c801160782012cb164759f0b9dd41762205b45e4c9a07d673/00.jpg"] -COLLECTIONS = { - "iran-analog-2024": [ +COLLECTIONS = [ + ("Iran - Hamadan, Kermanshah, Tabriz", [ "Taq-e-Bostan_000521270020.jpg", "Taq-e-Bostan_000521270019.jpg", "Taq-e-Bostan_000521270018.jpg", "Tabriz_000521270013.jpg", "Tabriz_000521270012.jpg", "Iran_000521270023.jpg", @@ -26,8 +26,9 @@ COLLECTIONS = { "Bistoon_000521270027.jpg", "Bistoon_000521270026.jpg", "Bistoon_000521270025.jpg", "Bazaar-e-Tabriz_000521270010.jpg", "Bazaar-e-Tabriz_000521270009.jpg", "Bazaar-e-Tabriz_000521270008.jpg", - ], - "kazakhstan-2024": [ + "Babataher.jpg", + ]), + ("Kazakhstan - World Nomad Games", [ "x_DSC-0999.jpg", "x_DSC-0994.jpg", "World-Nomad-Games,-Kazakhstan_DSC-0685.jpg", "World-Nomad-Games,-Kazakhstan_DSC-0536.jpg", @@ -35,8 +36,35 @@ COLLECTIONS = { "World-Nomad-Games,-Kazakhstan_DSC-0298.jpg", "World-Nomad-Games,-Kazakhstan_DSC-0251.jpg", "Kazakhstan_DSC-0870.jpg", "Kazakhstan_DSC-0865.jpg", - ], -} + ]), + ("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", + ]), + ("Iran - Tehran & Qom", [ + "Home_000512360003.jpg", "Somewhere-in-Tehran_2.jpg", + "Somewhere-in-Tehran.jpg", "Grandmother's-old-room.jpg", + ]), + ("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", + ]), + ("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", + ]), +] class PhotoHighlightTests(unittest.TestCase): @@ -58,18 +86,20 @@ class PhotoHighlightTests(unittest.TestCase): self.assertIn("Transmission of Flesh by Erfan Ashourioun", grouped[2][3]) def test_existing_collection_highlight_starts(self): - iran = (ART / "2024-10-25-Taq-e-Bostan_000521270020.md").read_text() - kazakhstan = (ART / "2024-10-09-x_DSC-0999.md").read_text() - self.assertIn('anchor: "Iran - Hamadan, Kermanshah, Tabriz"', iran) - self.assertIn('anchor: "Kazakhstan - World Nomad Games"', kazakhstan) + for anchor, filenames in COLLECTIONS: + first = next(path for path in ART.glob("*.md") + if filenames[0] in path.read_text()) + self.assertIn(f'anchor: "{anchor}"', first.read_text()) def test_existing_collection_order_uses_distinct_seconds(self): - for folder, filenames in COLLECTIONS.items(): + for _, filenames in COLLECTIONS: records = [] for path in ART.glob("*.md"): content = path.read_text() - image = re.search(rf'/img/arts/{folder}/([^\s)"\']+)', content) + image = re.search(r'/img/arts/[^/]+/([^)]+)\)', content) if image: + if image.group(1) not in filenames: + continue date = re.search(r'^date: "([^"]+)"', content, re.MULTILINE) records.append((datetime.fromisoformat(date.group(1)), image.group(1))) records.sort(reverse=True)