|
|
@ -32,6 +32,7 @@ KNOWN_EXTENSIONS: Set[str] = set([ |
|
|
|
def munge_path(path: str) -> str: |
|
|
|
def munge_path(path: str) -> str: |
|
|
|
return re.sub(r'[\:*?"|<>]+', '-', path) |
|
|
|
return re.sub(r'[\:*?"|<>]+', '-', path) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
if len(sys.argv) != 3: |
|
|
|
if len(sys.argv) != 3: |
|
|
|
print(f'Usage: {os.path.basename(__file__)} PATHS-FILE DESTINATION-DIR', file=sys.stderr) |
|
|
|
print(f'Usage: {os.path.basename(__file__)} PATHS-FILE DESTINATION-DIR', file=sys.stderr) |
|
|
|
sys.exit(1) |
|
|
|
sys.exit(1) |
|
|
@ -156,3 +157,6 @@ for source_file in source_files: |
|
|
|
|
|
|
|
|
|
|
|
# TODO: improve this output (number of deleted files, number of new files, correct plural of 'files') |
|
|
|
# TODO: improve this output (number of deleted files, number of new files, correct plural of 'files') |
|
|
|
print(f'Finished copying {len(source_files)} new files to {destination_dir}') |
|
|
|
print(f'Finished copying {len(source_files)} new files to {destination_dir}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
|
|
|
|
main() |
|
|
|