update @ Sun Dec 15 14:32:31 EET 2024

Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
Arija A. 2024-12-15 14:32:31 +02:00
parent 33951e2092
commit e8025e3ffe
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

View file

@ -1811,7 +1811,7 @@ def lsmedia(config: dict[str, typing.Any]) -> int:
print(mdx)
for k, v in mdy.items():
print(" ", k, "=", v)
print(" ", k, "=", v)
return OK
@ -1871,6 +1871,29 @@ def purgemedia(config: dict[str, typing.Any]) -> int:
return OK
@cmds.new
def infomedia(config: dict[str, typing.Any]) -> int:
"""get info about media"""
for mdx in select_medias():
print(mdx)
for k, v in MEDIA_INDEX[mdx].items():
print(" ", k, "=", v)
for slug, post in config["posts"].items():
# Seperated for readability reasons
if "preview" in post and post["preview"] == mdx:
print(f" * used in {post['title']!r} ({slug})")
continue
if f"<@{mdx}>" in post["content"]:
print(f" * used in {post['title']!r} ({slug})")
continue
return OK
def main() -> int:
"""entry / main function"""