roto 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roto.rb +3 -3
- 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: 566e106fe89e2adbd1fb3fa4b0252eef572708cc
|
4
|
+
data.tar.gz: a9e929557b7a08c9b0baa5e85413557073a890c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51e15bef86bbc359acd664c6295cf399c7e996a256cdc2f489a06928d59ecefc8f413a6eb85d086bfc2fc49b21d2088935702b479f07f97c75b38bceff644806
|
7
|
+
data.tar.gz: 1b34131efb8d7bd26d1085928be109bc61ad99de52954877e151d53bd56d0513cdb3faac9b2c132bc3492938e1a0462c115ee417e4610ad892b9079fe33b6441
|
data/lib/roto.rb
CHANGED
@@ -9,7 +9,7 @@ class Roto
|
|
9
9
|
def initialize
|
10
10
|
@files = []
|
11
11
|
@types = ['.mp4', '.mov', '.jpg', '.png', '.mts']
|
12
|
-
@
|
12
|
+
@rename_duplicates = true
|
13
13
|
@errors = {}
|
14
14
|
end
|
15
15
|
|
@@ -27,7 +27,7 @@ class Roto
|
|
27
27
|
progressbar = ProgressBar.create(total: @files.count, format: '%w')
|
28
28
|
@files.each do |file|
|
29
29
|
begin
|
30
|
-
if @
|
30
|
+
if @rename_duplicates
|
31
31
|
ext = File.ext(file); name = File.basename(file, ext)
|
32
32
|
FileUtils.mv("#{file}", "#{destination}/#{name}_#{Time.now.to_i}#{ext}")
|
33
33
|
else
|
@@ -44,7 +44,7 @@ class Roto
|
|
44
44
|
progressbar = ProgressBar.create(total: @files.count, format: '%w')
|
45
45
|
@files.each do |file|
|
46
46
|
begin
|
47
|
-
if @
|
47
|
+
if @rename_duplicates
|
48
48
|
ext = File.ext(file); name = File.basename(file, ext)
|
49
49
|
FileUtils.cp("#{file}", "#{destination}/#{name}_#{Time.now.to_i}#{ext}")
|
50
50
|
else
|