view gendesc.py @ 129:8c39820da60a default tip

add decode-mixed-mode.c this decodes macintosh mixed-mode procedure types. It currently only supports stack-based procedures :)
author Paper <paper@tflc.us>
date Sun, 19 Oct 2025 22:48:24 -0400
parents 1a83948b7f80
children
line wrap: on
line source

import json
import sys
import datetime

with open(sys.argv[1]) as f:
    data = json.load(f)
    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"])