Mercurial > codedump
view gettimefromedls.py @ 127:fd2ea604dcf2 default tip
hg: clean up stupid subrepo crap
author | Paper <paper@tflc.us> |
---|---|
date | Tue, 25 Mar 2025 00:26:18 -0400 |
parents | a972dc788da0 |
children |
line wrap: on
line source
# get timestamps from Vegas EDL files # used in my unfinished compilation import sys import os import re parsedfl = [] def main(argv): with open(argv[1]) as fl: next(fl) i = 0 for line in fl.readlines(): # I LOVE REGEX!!! match = re.search("\d+; \d+; (\d+\.\d+); \d+\.\d+; \d+\.\d+; .+?; .+?; \d+; .+?; .+?; .+?; \"(.+?)\";", line) if match: parsedfl.append(match.group(1, 2)) i += 1 for i in parsedfl: print("%d:%02d: %s" % (round(float(i[0]) / 1000) / 60, round(float(i[0]) / 1000) % 60, os.path.basename(i[1]))) if __name__ == "__main__": main(sys.argv)