Minor tweaks

This commit is contained in:
Maboroshy 2017-09-14 22:25:44 +03:00 committed by GitHub
parent 96abe16fa7
commit ba259c6e2f
1 changed files with 3 additions and 3 deletions

View File

@ -251,9 +251,6 @@ if __name__ == '__main__':
if file[-5:] == '.lock':
os.remove(script_path + os.sep + file)
lockfile_path = script_path + os.sep + str(int(time.time())) + '.lock'
open(lockfile_path, 'w').close()
arg_parser = argparse.ArgumentParser(description='A script to turn everything in the inbox directory to markdown notes.')
arg_parser.add_argument('-i', '--inbox', action='store', dest='inbox_dir', required=True,
help="Full absolute path to the inbox directory to organize")
@ -335,6 +332,9 @@ if __name__ == '__main__':
write_note_and_delete(obj_to_write)
lockfile_path = script_path + os.sep + str(int(time.time())) + '.lock'
open(lockfile_path, 'w').close()
event_handler = FsEventHandler()
observer = watchdog.observers.Observer()
observer.schedule(event_handler, scan_path, recursive=True)