Mercurial > codedump
comparison gendesc.py @ 118:eac6dae753ca
*: major cleanup
committer: GitHub <noreply@github.com>
| author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
|---|---|
| date | Fri, 03 Mar 2023 22:51:28 +0000 |
| parents | getdate.py@1508aee998df |
| children | 1a83948b7f80 |
comparison
equal
deleted
inserted
replaced
| 117:40a7b6d9bd3b | 118:eac6dae753ca |
|---|---|
| 1 import json | |
| 2 import sys | |
| 3 import datetime | |
| 4 | |
| 5 with open(sys.argv[1]) as f: | |
| 6 data = json.load(f) | |
| 7 print(data['fulltitle'] + " [{0}]".format(data["uploader"]), end="\n\n-----------------\n\n") | |
| 8 upload_date = datetime.datetime(int(data["upload_date"][:-4]), int(data["upload_date"][4:][:-2]), int(data["upload_date"][6:])) | |
| 9 print("Published on " + f"{upload_date.strftime('%b')} {upload_date.strftime('%d').strip('0')}, {upload_date.strftime('%Y')}", end="\n\n") | |
| 10 print(data["description"]) |
