Compare commits
10 Commits
9d6e669343
...
51d4f90ff3
Author | SHA1 | Date |
---|---|---|
zhangsheng.93 | 51d4f90ff3 | |
zhangsheng.93 | a7c7dabb8d | |
zhangsheng.93 | d1c38a2015 | |
zhangsheng.93 | 970be87cfe | |
zhangsheng.93 | 96f265cc90 | |
zhangsheng.93 | 32d56e2bd9 | |
zhangsheng.93 | b53acd9aca | |
zhangsheng.93 | 0ea73c35d3 | |
zhangsheng.93 | 63d4ed65f4 | |
zhangsheng.93 | e55ddeb832 |
|
@ -0,0 +1 @@
|
||||||
|
.DS_Store
|
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 91 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,42 @@
|
||||||
|
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()
|
||||||
|
|
Before Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 13 KiB |