We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de566df commit f39d408Copy full SHA for f39d408
1 file changed
python3/remove-duplicates.py
@@ -10,6 +10,7 @@
10
"""
11
12
import argparse
13
+import hashlib
14
import imagehash
15
import os
16
import sys
@@ -62,6 +63,12 @@ def runOnClass(args, imgs):
62
63
imgs.remove(largestImg)
64
for img in imgs:
65
os.remove(img)
66
+
67
+ if args.sha256:
68
+ print("")
69
+ for img in imgs:
70
+ print(hashlib.sha256(open(img, 'rb').read()).hexdigest())
71
72
return numFound
73
74
if __name__ == '__main__':
@@ -72,6 +79,8 @@ def runOnClass(args, imgs):
79
parser.add_argument('--delete', action='store_true',
80
help="Delete the smallest duplicate images instead "
81
"of just listing them.")
82
+ parser.add_argument('--sha256', action='store_true',
83
+ help="Show sha256 sum for duplicate images")
75
84
args = parser.parse_args()
76
85
77
86
numFound = 0
0 commit comments