Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Kennedy committed Jan 20, 2015
1 parent daccf55 commit 7b5d980
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BatchTranscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def verifyOutputDir(self, dirname):
makedirs(dirname)

def touch(self, fname, times=None):
""" Utility method to just touch files in the output dir to verify
script is preserving the directory structure correctly
"""
with open(fname, 'a'):
utime(fname, times)

Expand Down Expand Up @@ -83,16 +86,19 @@ def __repr__(self):
print( "Usage: " + sys.argv[0] + " <Input Dir> <Output Dir>")
sys.exit(1)

# Grab the Command line params
input_dir = sys.argv[1]
output_dir = sys.argv[2]

print "Input Dir = ", input_dir
print "Output Dir = ", output_dir

# Create the grabber and kick off the search.
grabber = FileNameGrabber(input_dir)
grabber.getFileNames();
print "How many files did I get? ", grabber.size()

# Create the transcoder and loop through files to transcode.
encoder = TransCoder(output_dir)
for filename in grabber:
shortend_filename = filename[(len(input_dir)+1):]
Expand Down

0 comments on commit 7b5d980

Please sign in to comment.