Created
January 30, 2013 10:55
-
-
Save terrycojones/4672420 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def main(options): | |
saver = MetadataSaver(USERNAME, PASSWORD, INSTANCE, TAG, options.execute) | |
ts = Timestamp(TIMESTAMP_FILE) | |
oldest = ts.get() | |
newest = time.time() | |
for count, path in enumerate(walk(FILESYSTEM_ROOT, oldest, newest)): | |
logging.info('Modified file %d: %s' % (count, path)) | |
saver.save(path) | |
count += 1 | |
logging.info('Added metadata on %d file%s in %f seconds' % | |
(count, '' if count == 1 else 's', time.time() - newest)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment