update @ Sun Dec 15 16:26:52 EET 2024

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Arija A. 2024-12-15 16:26:52 +02:00
parent 2f1b0cd5ea
commit 8fdf660002
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: A50D5B4B599AF8A2
2 changed files with 3 additions and 4 deletions

View file

@ -3,8 +3,8 @@
"type": "image", "type": "image",
"width": 720, "width": 720,
"height": 1280, "height": 1280,
"alt": "A black cat sitting in a box peacefully.", "alt": "A black cat sitting in a box peacefully",
"purpose": "To have a cute cat who looks over blog.ari.lt!", "purpose": "To have a cute cat who looks over blog.ari.lt",
"title": "Tina in a box (2019-2020, I think)", "title": "Tina in a box (2019-2020, I think)",
"license": "CC-BY-SA", "license": "CC-BY-SA",
"credit": "Ari Archer", "credit": "Ari Archer",

View file

@ -1788,20 +1788,19 @@ def media(config: dict[str, typing.Any]) -> int:
"type": "image", "type": "image",
"width": width, "width": width,
"height": height, "height": height,
"alt": iinput("alt text"),
} }
elif mime.startswith("audio/"): elif mime.startswith("audio/"):
shutil.copy(path, fpath) shutil.copy(path, fpath)
MEDIA_INDEX[hash_hex] = { MEDIA_INDEX[hash_hex] = {
"type": "audio", "type": "audio",
"alt": iinput("alt text"),
} }
else: else:
return err(f"unsupported MIME: {mime!r}") return err(f"unsupported MIME: {mime!r}")
MEDIA_INDEX[hash_hex].update( MEDIA_INDEX[hash_hex].update(
{ {
"alt": iinput("alt text").strip("."),
"purpose": purpose, "purpose": purpose,
"title": title, "title": title,
"license": license, "license": license,