ebook_renamer 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -11
- data/lib/ebook_renamer/version.rb +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: 313909194fe3114ca7d424b52eb470113f9bd89a
|
4
|
+
data.tar.gz: ed04e84bf1ee591f4230bca25b7b08da6bed5100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d33738026713f6e14a0d3616936757fe533cdddd96305ff610905bfd6b62d5e833a7cc85ae1c2a29bfa49a6e310641389db928e76831fe4bd3491d74f166596d
|
7
|
+
data.tar.gz: a63ccf502342673b44d707b19f0bf95f4e2efe9b3e8dc43a98e1163a1a2f2a694a046282ef97eff641e5ff7daedc542c092481a6903dd4b02e4b7647e2907971
|
data/README.md
CHANGED
@@ -5,24 +5,33 @@ the metadata within the ebook itself (if available).
|
|
5
5
|
|
6
6
|
### Why do I wrote this gem
|
7
7
|
|
8
|
-
Almost
|
9
|
-
bad name. I really like the meaningful name to the file that I have
|
10
|
-
and give you the context to the content of the file.
|
8
|
+
Almost always when I purchase an ebook (or download a file from the internet) it always came with the
|
9
|
+
bad name. I really like the meaningful name to the file that I have and really hate to rename them manually.
|
11
10
|
|
12
|
-
I wrote this gem just to make it
|
11
|
+
I wrote this gem just to make it easy to rename the files in bulk and recursively.
|
13
12
|
|
14
|
-
This gem will rename any ebook files (
|
15
|
-
meta-data that embedded within
|
13
|
+
This gem will rename any ebook files (pdf, epub, mobi) using the available
|
14
|
+
meta-data that embedded within them.
|
16
15
|
|
17
16
|
So if you don't like to spend time renaming them manually then this gem is for you.
|
18
17
|
|
18
|
+
### How the file is renamed
|
19
|
+
|
20
|
+
The file will be renamed using the following format `<title>.by.<author(s)>`.`<extension>`
|
21
|
+
|
22
|
+
Also the final file name will be sanitized e.g. any multiple occurence of special characters will be
|
23
|
+
replace by one dot `.`.
|
24
|
+
|
25
|
+
For example if the meta-data of the ebook contain the title `Start with Why: How Grate Leader Inspire Everyone to Take Action`
|
26
|
+
and the author is `Simon Sinek` then the output will be `Start.with.Why.How.Great.Leader.Inspire.Everyone.to.Take.Action.by.Simon.Sinek.pdf`
|
27
|
+
Note that the `:` and one space before the word `How` is replaced with just one dot string.
|
28
|
+
|
19
29
|
### What you will need
|
20
30
|
|
21
31
|
* You will need to install the [Calibre](http://www.calibre-ebook.com/) and
|
22
32
|
[Calibre CLI](http://manual.calibre-ebook.com/cli/cli-index.html) on your OS.
|
23
33
|
|
24
|
-
*
|
25
|
-
as I don't use windows for quite sometime now.
|
34
|
+
* Linux or Mac OSX operating system
|
26
35
|
|
27
36
|
### Problems/Issues
|
28
37
|
|
@@ -83,7 +92,7 @@ Run the command without making any changes
|
|
83
92
|
You should see the result like the following
|
84
93
|
|
85
94
|
```
|
86
|
-
|
95
|
+
Your options: {:base_dir=>"test/fixtures/ebooks/", :meta_binary=>"ebook-meta", :recursive=>true, :commit=>false}
|
87
96
|
Input :test/fixtures/ebooks/demo1.pdf
|
88
97
|
Output:test/fixtures/ebooks/Fearless.Refactoring.by.Andrzej.Krzywda.pdf
|
89
98
|
Input :test/fixtures/ebooks/demo2.epub
|
@@ -92,7 +101,6 @@ Input :test/fixtures/ebooks/subdir/demo3.pdf
|
|
92
101
|
Output:test/fixtures/ebooks/subdir/Reliably.Deploying.Rails.Applications.by.Ben.Dixon.pdf
|
93
102
|
Input :test/fixtures/ebooks/subdir/demo4.epub
|
94
103
|
Output:test/fixtures/ebooks/subdir/EPUB.3.0.Specification.by.EPUB.3.Working.Group.epub
|
95
|
-
|
96
104
|
```
|
97
105
|
|
98
106
|
To actually rename the files using the following command
|
@@ -101,9 +109,17 @@ To actually rename the files using the following command
|
|
101
109
|
./bin/ebook_renamer --base-dir ./test/fixtures/ebooks --recursive --commit
|
102
110
|
# or short version
|
103
111
|
./bin/ebook_renamer -b ./test/fixtures/ebooks -r -c
|
104
|
-
|
105
112
|
```
|
106
113
|
|
114
|
+
Note:
|
115
|
+
|
116
|
+
The file will be renamed using the following format `<title>.by.<author(s)>`.`<extension>`
|
117
|
+
Also the final file name will be sanitized e.g. any special characters will be
|
118
|
+
converted to one dot `.`.
|
119
|
+
|
120
|
+
For example if the title is `Start with Why: How Grate Leader Inspire Everyone to Take Action` and the author is `Simon Sinek` then
|
121
|
+
the output will be something like `Start.with.Why.How.Great.Leader.Inspire.Everyone.to.Take.Action.by.Simon.Sinek.pdf` etc.
|
122
|
+
|
107
123
|
### Sample Usage (from `ebook_renamer --help`)
|
108
124
|
|
109
125
|
```
|
@@ -142,6 +158,10 @@ To actually rename the files using the following command
|
|
142
158
|
|
143
159
|
### Changelog
|
144
160
|
|
161
|
+
#### 0.0.6
|
162
|
+
|
163
|
+
- Fix and update README.md
|
164
|
+
|
145
165
|
#### 0.0.5
|
146
166
|
|
147
167
|
- Update the README.md to include usage example
|