Skip to content

Instantly share code, notes, and snippets.

@terrycojones
Created January 30, 2013 10:55
Show Gist options
  • Save terrycojones/4672420 to your computer and use it in GitHub Desktop.
Save terrycojones/4672420 to your computer and use it in GitHub Desktop.
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