Package: pathdiff
pathdiffPathdiff is a tool for:Detecting duplicate files in directories (Based onhttps://stackoverflow.com/a/36113168/300783)Comparing directories for differences in structure and contentThere are a number of alternative tools for both usecases, but this is a simple
implementation that can be easily modified (unlike complex gui tools) and
provides small conveniences like progress bars (unlike more basic command line
tools like diff).Table of ContentsInstallationUsageLicenseInstallationpip install pathdiffUsage❯ pathdiff find-duplicates tests/test1Fetching files from tests/test1|████████████████████████████████████████| 9 in 0.1s (88.59/s)Fetching file sizes|████████████████████████████████████████| 9/9 [100%] in 0.1s (88.10/s)Computing small hashes|████████████████████████████████████████| 9/9 [100%] in 0.1s (88.25/s)Computing full hashes|████████████████████████████████████████| 9/9 [100%] in 0.1s (88.01/s)Duplicates found:tests/test1/f2/file7.txttests/test1/f1/file4.txtDuplicates found:tests/test1/f1/file2.txttests/test1/f1/file3.txttests/test1/f1/file1.txtDuplicates found:tests/test1/f2/file8.txttests/test1/f2/file9.txtDuplicates found:tests/test1/f1/file5.txttests/test1/f1/file6.txt❯ pathdiff compare-directories tests/test2/path1 tests/test2/path2Comparing directories tests/test2/path1 and tests/test2/path2Comparing directory structures|████████████████████████████████████████| 28 in 0.1s (265.55/s)Comparing common files|████████████████████████████████████████| 9/9 [100%] in 0.1s (85.30/s)Paths found in tests/test2/path1 but not found in tests/test2/path2:file3-1.txtf6/f1-1f5/f1/file7-1.txtf1/file3-1.txtf1/f1/file3-1.txtPaths found in tests/test2/path2 but not found in tests/test2/path1:file3-2.txtf6/f1-2f5/f1/file7-2.txtf1/file3-2.txtf1/f1/file3-2.txtFiles found in tests/test2/path1 and tests/test2/path2 but contents do not match:file2.txtf4/f1/file6.txtf1/file2.txtf1/f1/file2.txt❯ pathdiff compare-contents tests/test3/path1 tests/test3/path2Comparing contents in directories tests/test3/path1 and tests/test3/path2Fetching files from tests/test3/path1|████████████████████████████████████████| 12 in 0.1s (118.00/s)Fetching files from tests/test3/path2|████████████████████████████████████████| 8 in 0.1s (77.02/s)Fetching file sizes|████████████████████████████████████████| 20/20 [100%] in 0.1s (196.16/s)Computing small hashes|████████████████████████████████████████| 20/20 [100%] in 0.1s (196.73/s)Computing full hashes|████████████████████████████████████████| 16/16 [100%] in 0.1s (155.59/s)Files found in tests/test3/path1 but not found in tests/test3/path2 (by content, names may match):f1/f1/file5.txtf1/f1/file4-1.txtFiles found in tests/test3/path2 but not found in tests/test3/path1 (by content, names may match):file5.txtfile4-2.txtFiles which do not match one-to-one or have different names:Group of duplicate files:Duplicates from tests/test3/path1:file7.txtf1/f1/file7.txtDuplicates from tests/test3/path2:Group of duplicate files:Duplicates from tests/test3/path1:file9-1.txtf1/f1/file9.txtDuplicates from tests/test3/path2:file9.txtGroup of duplicate files:Duplicates from tests/test3/path1:file8.txtf1/f1/file8.txtDuplicates from tests/test3/path2:file8.txtGroup of duplicate files:Duplicates from tests/test3/path1:f1/f1/file6-1.txtDuplicates from tests/test3/path2:file6-2.txtLicensepathdiffis distributed under the terms of theMITlicense.