feature: add download of alt-texts
This commit is contained in:
@@ -106,6 +106,11 @@ class Download:
|
|||||||
with (self.config.p_data_pictures / f"{picture['id']}include.tex").open("w") as file:
|
with (self.config.p_data_pictures / f"{picture['id']}include.tex").open("w") as file:
|
||||||
file.write(picture["latex"])
|
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
|
# Download SVG
|
||||||
data = self.api.get_file(f"assets/{picture['picture']}")
|
data = self.api.get_file(f"assets/{picture['picture']}")
|
||||||
with (self.config.p_data_pictures / f"{picture['id']}.svg").open("wb") as file:
|
with (self.config.p_data_pictures / f"{picture['id']}.svg").open("wb") as file:
|
||||||
|
|||||||
Reference in New Issue
Block a user