ssimsort 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssimsort.rb +6 -2
- data/ssimsort.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3809a9a2eef5abf72bbce3a7655c3faa876fcd6
|
4
|
+
data.tar.gz: 1dbf8efdacd3552b52fb180dcad2f8f5b0a2c26d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 583c6aa86b69c698b6f4c080f3ea003fa6629509d1491f9d21b2272e04de3b3d9fdf8c2ad9bce2acd2280588f7078c9a1dcae4494ecabe5411efb17f8f958b96
|
7
|
+
data.tar.gz: 0b5928163a9cc71a57f601b61fe220af000f6281bd5ca241f4b429b4acdcaac6a2f757228960a40d711cb33c3f63e5c9acf36a1d9b215667c3fc0164e462af2c
|
data/lib/ssimsort.rb
CHANGED
@@ -42,9 +42,13 @@ module SsimSort
|
|
42
42
|
set = files.combination(2).to_a
|
43
43
|
set.each do |file1,file2|
|
44
44
|
path = "#{output_path}/#{file1.split("/").last}/"
|
45
|
-
dir = FileUtils.makedirs(path) unless File.exists?(path)
|
46
45
|
simil = SsimSort.ssim(file1,file2)
|
47
|
-
simil < tolerance
|
46
|
+
if simil < tolerance
|
47
|
+
next
|
48
|
+
else
|
49
|
+
FileUtils.makedirs(path) unless File.exists?(path)
|
50
|
+
FileUtils.cp(file2,path)
|
51
|
+
end
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|
data/ssimsort.gemspec
CHANGED