annotate gendesc.py @ 133:0d8eabdd12ab default tip

create: write H:MM:SS timestamps, add option to fill with gaussian-blur instead of black many albums are longer than one hour so writing H:MM:SS is a necessity. if anything there will just be verbose info that isn't important for my use-case. however the gaussian-blur is simply broken. It works, and it plays locally just fine, but YouTube in particular elongates the video to fit the full width. I'm not entirely sure why it does this, but it makes it useless and ugly.
author Paper <paper@tflc.us>
date Sat, 03 Jan 2026 20:25:38 -0500
parents 1a83948b7f80
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
64
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 import json
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 import sys
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
3 import datetime
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 with open(sys.argv[1]) as f:
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
9 upload_date = datetime.datetime(int(data["upload_date"][:-4]), int(data["upload_date"][4:][:-2]), int(data["upload_date"][6:]))
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 print("Published on " + f"{upload_date.strftime('%b')} {upload_date.strftime('%d').strip('0')}, {upload_date.strftime('%Y')}", end="\n\n")
1508aee998df Add Windows 95 Keygen GUI
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11 print(data["description"])