def inspect(): begin_sec, end_sec = _sec_args() print "Use sections", begin_sec, "->", end_sec try: _, end_time, sections = avmerge.find_range(begin_sec, end_sec) if len(sections) == 0: return sliced_segs = avmerge.slice_partial(sections) except sequence.ParseError, e: traceback.print_exc() print >> sys.stderr, e.linenum, ":", e.message, ":", e.content return
def export(): if len(sys.argv) != 2: print >> sys.stderr, "Args:" print >> sys.stderr, " OUTPUT_DIRECTORY" return sys.exit(1) if not pathutil.isdir(sys.argv[1]): print >> sys.stderr, sys.argv[1], "is not a directory" return sys.exit(1) try: files = avmerge.slice_partial(avmerge.find_range(":begin", ":end")[2]) except sequence.ParseError, e: traceback.print_exc() print >> sys.stderr, e.linenum, ":", e.message, ":", e.content