def main(): args = sys.argv if len(args) < 4: print "Usage: movieFile srtFile filterFile" sys.exit() categories = filter.parse_file(args[3]) profanity = filter.get_all_words(categories) worker = EDLManager(args[2], args[1], profanity); if len(args) == 5: worker.setEDLName(args[4]) worker.updateEDL() print "EDL file %s created / or updated" % worker.edlLoc
def createEDL(srtLoc, fileLoc): try: safety = Addon.getSetting("safety") safety = float(safety) / 1000 edl = EDLManager(srtLoc, fileLoc, get_blocked_words(), safety) if Addon.getSetting("editsrt") == "true": # Tell the edl manager to replace blocked works on SRT file too edl.modify_srt = True # Does all work to update / create EDL, update SRT edl.updateEDL() return True except: print "Unexpected error:", sys.exc_info()[0] return False
def createEDL(srtLoc, fileLoc): try: safety = Addon.getSetting("safety") safety = float(safety) / 1000 edl = EDLManager(srtLoc, fileLoc, get_blocked_words(), safety) edl.open_file = lambda x, y: xbmcvfs.File(x, y) edl.rename = lambda x, y: xbmcvfs.rename(x, y) if Addon.getSetting("editsrt") == "true": # Tell the edl manager to replace blocked works on SRT file too edl.modify_srt = True # Does all work to update / create EDL, update SRT edl.updateEDL() return True except: print "Unexpected error:", sys.exc_info()[0] return False
def main(): args = sys.argv if len(args) < 3: print "Usage: srtFile filterFile" sys.exit() categories = filter.parse_file(args[2]) profanity = filter.get_all_words(categories) worker = EDLManager(args[1], profanity) if len(args) == 4: worker.setEDLName(args[3]) worker.updateEDL() print "EDL file %s created / or updated" % worker.edlLoc