mirror of
https://git.ari.lt/ari.lt/blog.ari.lt.git
synced 2025-02-04 09:39:25 +01:00
update @ Sun Dec 15 14:32:31 EET 2024
Signed-off-by: Ari Archer <ari@ari.lt>
This commit is contained in:
parent
33951e2092
commit
e8025e3ffe
1 changed files with 24 additions and 1 deletions
|
@ -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"""
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue