view sfv.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 2aa9614cb39a
children
line wrap: on
line source

import sys
import zlib


def crc(filename): return "%X" % (zlib.crc32(
    open(filename, "rb").read()) & 0xFFFFFFFF)


try:
    temp = sys.argv[1]
except Exception:
    print("No file specified!")
    sys.exit()

f = open(sys.argv[1])
lines = f.readlines()
f.close()

for line in lines:
    if not line[0] == ";":
        crc32 = line.strip()[-8:]
        name = line.strip()[:-8]
        if crc(name).zfill(8) == crc32:
            print(f"{name}: CRC hash match!")
        else:
            print(f"{name}: CRC hash does not match!")