ebook_renamer 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOGS.md +5 -0
- data/README.md +42 -22
- data/lib/ebook_renamer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 997b5916437a090a352f8745eefae5a77c971efe
|
4
|
+
data.tar.gz: 3ece1787c4c080e9ad5daba7108e56c8dba8056c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829ef6b09c6438ede8164ee4b8f5de104c4a874ea7ab3ef63017ff07fbc701ab23bdc577925d7a72d03138ab95c706302dea465dbd7e2b8605e7bcbe5f24765d
|
7
|
+
data.tar.gz: 8372c52b2973d183fd1acb7075053328ce2ea1690a68f1700d574fbee571b6af2fad8329decb91717ef3fc7a7d59d35bf2e55e79536f20bd6bddbe103a045b27
|
data/CHANGELOGS.md
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
|
1
|
+
ebook_renamer
|
2
|
+
=============
|
2
3
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/ebook_renamer.svg)]
|
4
|
-
[![Dependency Status](https://gemnasium.com/agilecreativity/ebook_renamer.png)]
|
5
|
-
[![Code Climate](https://codeclimate.com/github/agilecreativity/ebook_renamer.png)]
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/ebook_renamer.svg)][gem]
|
5
|
+
[![Dependency Status](https://gemnasium.com/agilecreativity/ebook_renamer.png)][gemnasium]
|
6
|
+
[![Code Climate](https://codeclimate.com/github/agilecreativity/ebook_renamer.png)][codeclimate]
|
7
|
+
|
8
|
+
[gem]: http://badge.fury.io/rb/ebook_renamer
|
9
|
+
[gemnasium]: https://gemnasium.com/agilecreativity/ebook_renamer
|
10
|
+
[codeclimate]: https://codeclimate.com/github/agilecreativity/ebook_renamer
|
6
11
|
|
7
12
|
Perform bulk rename of ebook files (epub,mobi,pdf) based on the embedded metadata (title, author(s)).
|
8
|
-
This version depends on the opensource software called [Calibre][]
|
9
|
-
|
13
|
+
This version depends on the opensource software called [Calibre][] that comes
|
14
|
+
with [Calibre CLI][] which is very easy to install on OSX or Linux system.
|
10
15
|
|
11
16
|
### How the file is renamed
|
12
17
|
|
@@ -25,8 +30,8 @@ if the `--sep-string _` is used then the output will be
|
|
25
30
|
|
26
31
|
### What you will need
|
27
32
|
|
28
|
-
* You will need to install the [Calibre]
|
29
|
-
[Calibre CLI]
|
33
|
+
* You will need to install the [Calibre][] and
|
34
|
+
[Calibre CLI][] on your OS.
|
30
35
|
|
31
36
|
In particular the gem is looking for the `ebook-meta` binary in a path.
|
32
37
|
If this is not installed the error will be raised.
|
@@ -36,8 +41,10 @@ if the `--sep-string _` is used then the output will be
|
|
36
41
|
### Installation and Usage:
|
37
42
|
|
38
43
|
```sh
|
39
|
-
bundle
|
40
44
|
gem install ebook_renamer
|
45
|
+
|
46
|
+
# Show the list of options
|
47
|
+
ebook_renamer
|
41
48
|
```
|
42
49
|
|
43
50
|
### Quick Usage
|
@@ -60,6 +67,15 @@ ebook_renamer rename
|
|
60
67
|
Which should produce something like
|
61
68
|
|
62
69
|
```
|
70
|
+
Changes will not be applied without the --commit option.
|
71
|
+
1 of 1::[./Build_a_Ruby_Gem_by_Brandon_Hilkert.pdf] -> [./Build.a.Ruby.Gem.by.Brandon.Hilkert.pdf]
|
72
|
+
2 of 2::[./Learn_Vimscript_the_Hard_Way_by_Steve_Losh.mobi] -> [./Learn.Vimscript.the.Hard.Way.by.Steve.Losh.mobi]
|
73
|
+
3 of 3::[./Learn_Vimscript_the_Hard_Way_by_Steve_Losh.pdf] -> [./Learn.Vimscript.the.Hard.Way.by.Steve.Losh.pdf]
|
74
|
+
4 of 4::[./incoming/pdfmark_Reference_Manual_by_Adobe_Developer_Support.pdf] -> [./incoming/pdfmark.Reference.Manual.by.Adobe.Developer.Support.pdf]
|
75
|
+
5 of 5::[./playbook_by_thoughtbot.mobi] -> [./playbook.by.thoughtbot.mobi]
|
76
|
+
6 of 6::[./playbook_by_thoughtbot.pdf] -> [./playbook.by.thoughtbot.pdf]
|
77
|
+
7 of 7::[./rails/Everyday_Rails_Testing_with_RSpec_by_Aaron_Sumner.mobi] -> [./rails/Everyday.Rails.Testing.with.RSpec.by.Aaron.Sumner.mobi]
|
78
|
+
8 of 8::[./rails/Everyday_Rails_Testing_with_RSpec_by_Aaron_Sumner.pdf] -> [./rails/Everyday.Rails.Testing.with.RSpec.by.Aaron.Sumner.pdf]
|
63
79
|
```
|
64
80
|
### Detail Usage
|
65
81
|
|
@@ -68,21 +84,22 @@ you want to rename.
|
|
68
84
|
|
69
85
|
```sh
|
70
86
|
# Cd to the directory containing the file(s) you like to rename
|
71
|
-
|
87
|
+
cd ~/Dropbox/ebooks/
|
72
88
|
|
73
|
-
# Or specify the directory as an option from any where you
|
74
|
-
|
89
|
+
# Or specify the directory as an option from any where if you set appropriate
|
90
|
+
# version of ruby (e.g. rbenv local 2.1.1 or rvm use 2.1.1)
|
91
|
+
ebook_renamer rename --base-dir ~/Dropbox/ebooks/samples
|
75
92
|
|
76
93
|
# For help on how to use the gem just type without any options.
|
77
|
-
|
94
|
+
ebook_renamer
|
78
95
|
|
79
96
|
# Run the command without making any changes to the files (dry-run) in the current directory
|
80
|
-
|
97
|
+
ebook_renamer rename --base-dir . --recursive
|
81
98
|
|
82
99
|
# Once you are happy with the result then
|
83
|
-
|
100
|
+
ebook_renamer rename --base-dir . --recursive --commit
|
84
101
|
|
85
|
-
|
102
|
+
# Or using the short version
|
86
103
|
|
87
104
|
$ebook_renamer rename -b . -r -c
|
88
105
|
```
|
@@ -112,21 +129,21 @@ You should see the result like the following
|
|
112
129
|
|
113
130
|
```
|
114
131
|
Changes will not be applied without the --commit option.
|
115
|
-
[
|
116
|
-
[
|
117
|
-
[
|
118
|
-
[
|
132
|
+
1 of 4::[./demo1.pdf] -> [./Fearless.Refactoring.by.Andrzej.Krzywda.pdf]
|
133
|
+
2 of 4::[./demo2.epub] -> [./EPUB.3.0.Specification.by.EPUB.3.Working.Group.epub]
|
134
|
+
3 of 4::[./subdir/demo1.pdf] -> [./subdir/Reliably.Deploying.Rails.Applications.by.Ben.Dixon.pdf]
|
135
|
+
4 of 4::[./subdir/demo2.epub] -> [./subdir/EPUB.3.0.Specification.by.EPUB.3.Working.Group.epub]
|
119
136
|
```
|
120
137
|
|
121
138
|
To actually make the actual rename just pass in the `--commit` option like so:
|
122
139
|
|
123
140
|
```sh
|
124
|
-
|
141
|
+
ebook_renamer rename --base-dir ./test/fixtures/ebooks --recursive --commit
|
125
142
|
```
|
126
143
|
or the short version
|
127
144
|
|
128
145
|
```sh
|
129
|
-
|
146
|
+
ebook_renamer rename -b ./test/fixtures/ebooks -r -c
|
130
147
|
```
|
131
148
|
|
132
149
|
The final output should be something like:
|
@@ -171,3 +188,6 @@ Rename multiple ebook files (pdf,epub,mobi) from a given directory
|
|
171
188
|
4. Make sure that you add the tests and ensure that all tests are passed
|
172
189
|
5. Push to the branch (`git push origin my-new-feature`)
|
173
190
|
6. Create new Pull Request
|
191
|
+
|
192
|
+
[Calibre]: http://www.calibre-ebook.com/
|
193
|
+
[Calibre CLI]: http://manual.calibre-ebook.com/cli/cli-index.html
|
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.
|
4
|
+
version: 0.1.6
|
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-
|
11
|
+
date: 2014-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|