diff --git a/TVEncoder.py b/TVEncoder.py index bb11bc6..6dc3e5a 100644 --- a/TVEncoder.py +++ b/TVEncoder.py @@ -5,3 +5,29 @@ Created on Fri Jul 5 14:14:22 2013 @author: shanef """ +import sys +import getopt + +def main(argv): + numFiles = 0 + doEncode = True + try: + opts, args = getopt.getopt(argv,"hn:l") + except getopt.GetoptError: + print 'TVEncoder.py -n - processes n recordings' + print 'TVEncoder.py -l -n - lists the files that will be processed without actually encoding them' + sys.exit(2) + for opt, arg in opts: + if opt == '-h': + print 'TVEncoder.py -n - processes n recordings' + print 'TVEncoder.py -l -n - lists the files that will be processed without actually encoding them' + sys.exit() + elif opt == "-n": + numFiles = arg + elif opt == "-l"): + doEncode = True + + print "Get to work" + +if __name__ == "__main__": + main(sys.argv[1:]) \ No newline at end of file