Mercurial > codedump
annotate gendesc.py @ 132:71df0cf3aa05 default tip
add create.py
this is a script to render out video files from entire albums,
singles, or EPs. eventually it can be edited to be more robust
(such as automatically finding discogs/musicbrainz links) but
I think it's pretty damn good for now.
It's basically just an ffmpeg frontend with a few hardcoded options
that are suitable for this kind of thing.
| author | Paper <paper@tflc.us> |
|---|---|
| date | Fri, 02 Jan 2026 10:35:03 -0500 |
| parents | 1a83948b7f80 |
| children |
| rev | line source |
|---|---|
| 64 | 1 import json |
| 2 import sys | |
| 3 import datetime | |
| 4 | |
| 5 with open(sys.argv[1]) as f: | |
| 6 data = json.load(f) | |
|
128
1a83948b7f80
gendesc: only use fulltitle if available
Paper <paper@tflc.us>
parents:
118
diff
changeset
|
7 title = data['title'] if not 'fulltitle' in data else data['fulltitle'] |
|
1a83948b7f80
gendesc: only use fulltitle if available
Paper <paper@tflc.us>
parents:
118
diff
changeset
|
8 print(title + " [{0}]".format(data["uploader"]), end="\n\n-----------------\n\n") |
| 64 | 9 upload_date = datetime.datetime(int(data["upload_date"][:-4]), int(data["upload_date"][4:][:-2]), int(data["upload_date"][6:])) |
| 10 print("Published on " + f"{upload_date.strftime('%b')} {upload_date.strftime('%d').strip('0')}, {upload_date.strftime('%Y')}", end="\n\n") | |
| 11 print(data["description"]) |
