ebook_renamer 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06938f447fa5bb2e2ca8c39497555ad4af092481
4
- data.tar.gz: 43bb582e47b7a996b18b68389a8e035bb98681be
3
+ metadata.gz: e9ef7405b620681debaedb895824705a3dadf3f6
4
+ data.tar.gz: 64dcd10441db07e72207958a0401927416e8228e
5
5
  SHA512:
6
- metadata.gz: 01b405b2d3073da7ddf8595b793fe01ceb5b05621f9514d25a996678e9678fa9bccee357f9da23c4f50291bf959ec3fdbba9f2aec07159436233acce3e561813
7
- data.tar.gz: c60b7a3ca43687844b4d9f006abf66d058e64de45db6280ed7b3114b4ea80a3b42db9b08a7b3bca8cbee61afebc00d101928d23c64bb09692e5c3dfb5c765da7
6
+ metadata.gz: 18155ce3c48ec30026b599391cc5579e17a8e3938e60c44c163e1b05990c1d573f68e98188407e86a67a143b05ed98706ced0afaf7152a7b202838c2ea78e390
7
+ data.tar.gz: 87a9b9574a114a0dddbb1ddd89ff86d2cde8a36288553b15c301d3e2bf98c08ccc9ce4b5d9988636b3eb1c1c585349bd50e40af059a250f02634621b8bdbe895
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ### Changelog
2
2
 
3
+ #### 0.1.12
4
+
5
+ - Skip the file if the result filename exist locally.
6
+
3
7
  #### 0.1.11
4
8
 
5
9
  - Make use of [filename_cleaner][] gem for renaming filename
@@ -118,7 +118,13 @@ Rename multiple ebook files (pdf,epub,mobi) from a given directory
118
118
  if input_file != output_file
119
119
  puts "#{index + 1} of #{total} old name : #{input_file}"
120
120
  puts "#{index + 1} of #{total} new name : #{output_file}"
121
- FileUtils.mv(input_file, output_file) if commit
121
+ if commit
122
+ if File.exist?(output_file)
123
+ puts "#{index + 1} of #{total} skip : #{output_file} [File exist locally]"
124
+ else
125
+ FileUtils.mv(input_file, output_file)
126
+ end
127
+ end
122
128
  else
123
129
  puts "#{index + 1} of #{total} skip name: #{input_file} [title is the same as the filename]"
124
130
  end
@@ -1,3 +1,3 @@
1
1
  module EbookRenamer
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebook_renamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-31 00:00:00.000000000 Z
11
+ date: 2014-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor