From aa30ffaf77c9e680d0070af0bc8f52c94ecb0bb6 Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Sun, 9 Nov 2025 11:52:18 +0100 Subject: [PATCH] feature: add download of alt-texts --- src/download.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/download.py b/src/download.py index 4c9d586..fbabf7e 100644 --- a/src/download.py +++ b/src/download.py @@ -106,6 +106,11 @@ class Download: with (self.config.p_data_pictures / f"{picture['id']}include.tex").open("w") as file: file.write(picture["latex"]) + # Save Alt-Text to file + if picture["alt_text_reviewed"] is not None: + with (self.config.p_data_pictures / f"{picture['id']}.txt").open("w") as file: + file.write(picture["alt_text"]) + # Download SVG data = self.api.get_file(f"assets/{picture['picture']}") with (self.config.p_data_pictures / f"{picture['id']}.svg").open("wb") as file: