Reformat DataPuller
This commit is contained in:
parent
7dfaccbafe
commit
036a20cd27
1 changed files with 5 additions and 3 deletions
|
|
@ -7,8 +7,9 @@ import filecmp
|
||||||
|
|
||||||
# Argument Parsing
|
# Argument Parsing
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog='DataPuller',
|
prog="DataPuller",
|
||||||
description='Check differences between folders and update files if needed')
|
description="Check differences between folders and update files if needed",
|
||||||
|
)
|
||||||
|
|
||||||
parser.add_argument("-i", "--input", help="Path to input folder")
|
parser.add_argument("-i", "--input", help="Path to input folder")
|
||||||
parser.add_argument("-o", "--output", help="Path to output folder")
|
parser.add_argument("-o", "--output", help="Path to output folder")
|
||||||
|
|
@ -42,6 +43,7 @@ if not args.output:
|
||||||
else:
|
else:
|
||||||
outpath = args.output
|
outpath = args.output
|
||||||
|
|
||||||
|
|
||||||
def get_files(path):
|
def get_files(path):
|
||||||
file_info = []
|
file_info = []
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
|
|
@ -54,6 +56,7 @@ def get_files(path):
|
||||||
file_info.append(rel_path)
|
file_info.append(rel_path)
|
||||||
return file_info
|
return file_info
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
startstring = " FOLDER-SYNC 1.0 "
|
startstring = " FOLDER-SYNC 1.0 "
|
||||||
if not args.quiet:
|
if not args.quiet:
|
||||||
|
|
@ -197,6 +200,5 @@ def main():
|
||||||
input("\nPress ENTER to exit...")
|
input("\nPress ENTER to exit...")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue