commit c610ec8516c279a2b9271fa2e330745250429762
parent 10025a7fc483089af9bb9c38484b57009e8786e1
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sat, 7 Jan 2012 12:37:47 +0100
just output the data
Diffstat:
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/rdupes.py b/rdupes.py
@@ -4,17 +4,8 @@ import os
import sys
import hashlib
-hashes = {}
-sizes = {}
-
def register(f, h, s):
- print >> sys.stderr, f
- if h in hashes.keys():
- hashes[h].append(f)
- assert(sizes[h] == s)
- else:
- hashes[h] = [f]
- sizes[h] = s
+ print "%s\t%s\t%s" % (h, s, f)
def hashfile(f):
sha1 = hashlib.sha1()
@@ -54,7 +45,3 @@ def explore(d):
for d in sys.argv[1:]:
explore(d)
-hashes2 = [(sizes[x], hashes[x]) for x in hashes.keys() if len(hashes[x]) > 1]
-hashes2.sort(reverse=True)
-print '\n'.join([str(s) + ": " + ' '.join(f) for (s, f) in hashes2])
-