This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,re,time,subprocess | |
folder2 = os.getcwd() | |
folderout = os.path.join(folder2, 'output') | |
mkvpaths = [] | |
mkvnames = [] | |
subpaths = [] | |
fontpaths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# combine adjacent lines with the same timecodes | |
import sys | |
from datetime import datetime, timedelta | |
def find_nth(string, substring, n, start=0): | |
"""find nth occurance of substring in string starting at position start. | |
(uses string.find) n starts at 1, start starts at 0""" | |
found = string.find(substring, start) |