Mercurial > codedump
changeset 128:1a83948b7f80
gendesc: only use fulltitle if available
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 19 Oct 2025 22:46:55 -0400 |
parents | fd2ea604dcf2 |
children | 8c39820da60a |
files | gendesc.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gendesc.py Tue Mar 25 00:26:18 2025 -0400 +++ b/gendesc.py Sun Oct 19 22:46:55 2025 -0400 @@ -4,7 +4,8 @@ with open(sys.argv[1]) as f: data = json.load(f) - print(data['fulltitle'] + " [{0}]".format(data["uploader"]), end="\n\n-----------------\n\n") + title = data['title'] if not 'fulltitle' in data else data['fulltitle'] + print(title + " [{0}]".format(data["uploader"]), end="\n\n-----------------\n\n") upload_date = datetime.datetime(int(data["upload_date"][:-4]), int(data["upload_date"][4:][:-2]), int(data["upload_date"][6:])) print("Published on " + f"{upload_date.strftime('%b')} {upload_date.strftime('%d').strip('0')}, {upload_date.strftime('%Y')}", end="\n\n") print(data["description"])