Compare commits
No commits in common. "51d4f90ff33183554dc0051dacf59c1ada9db1b6" and "9d6e669343af4f41421aed6640d2878172765c68" have entirely different histories.
51d4f90ff3
...
9d6e669343
|
@ -1 +0,0 @@
|
|||
.DS_Store
|
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 91 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 14 KiB |
42
findDup.py
|
@ -1,42 +0,0 @@
|
|||
import hashlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def getmd5(filename):
|
||||
file_txt = open(filename, 'rb').read()
|
||||
return hashlib.md5(file_txt).hexdigest()
|
||||
|
||||
|
||||
def main():
|
||||
allfiles = sys.argv[1]
|
||||
print("input file:%s"%allfiles)
|
||||
# all_md5 = []
|
||||
# total_file = 0
|
||||
# total_delete = 0
|
||||
all_md5 = {}
|
||||
for dir in os.listdir(allfiles):
|
||||
path = os.path.join(allfiles,dir)
|
||||
filemd5 = getmd5(path)
|
||||
if filemd5 in all_md5:
|
||||
print("dup file:%s\n"%dir)
|
||||
print("origin pic:%s\n"%all_md5[filemd5])
|
||||
os.remove("%s/%s"%(allfiles, dir))
|
||||
else:
|
||||
all_md5[filemd5] = dir
|
||||
if filemd5 not in dir:
|
||||
if ".png" in dir:
|
||||
filemd5 = filemd5 + ".png"
|
||||
if ".jpg" in dir:
|
||||
filemd5 = filemd5 + ".png"
|
||||
if ".webp" in dir:
|
||||
filemd5 = filemd5 + ".webp"
|
||||
if ".gif" in dir:
|
||||
filemd5 = filemd5 + ".gif"
|
||||
if ".jpeg" in dir:
|
||||
filemd5 = filemd5 + ".jpeg"
|
||||
os.rename(path, os.path.join(allfiles, filemd5))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 13 KiB |