Add duplicate_dirs.py.

This commit is contained in:
voussoir 2020-02-06 11:51:39 -08:00
parent 80e55383f2
commit fd29170f76

14
duplicate_dirs.py Normal file
View file

@ -0,0 +1,14 @@
from voussoirkit import spinal
basenames = {}
walker = spinal.walk_generator('.', yield_directories=True, yield_files=False)
for directory in walker:
basenames.setdefault(directory.basename, []).append(directory)
for (basename, dupes) in basenames.items():
if len(dupes) == 1:
continue
for dupe in dupes:
print(dupe.absolute_path)
print()