ebook_renamer 0.0.5 → 0.0.6

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: 00da0a17b93d287616c639412fb23a78cee66829
4
- data.tar.gz: 18813d9a86700d6ffa46d0f0094c9347de053b4a
3
+ metadata.gz: 313909194fe3114ca7d424b52eb470113f9bd89a
4
+ data.tar.gz: ed04e84bf1ee591f4230bca25b7b08da6bed5100
5
5
  SHA512:
6
- metadata.gz: 5ef70fbf621e03967912a119c5ce8461ad39ff1e9b58a65d3930ba839955fd7cf31993432de76afe49539d2f6b82f2644436f301c5b950b6f7d564237377902c
7
- data.tar.gz: 2abddd43e52740123fd37b16ddd14b904849c1fdbc4c3aa06ac08f7d7f4f9cfad9cafb13075809a8e3e9b23d29ce65a82967b18157934b716f5f7866012ea870
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 alwasy when I purchase a new ebooks (or download them from the internet) they always came with the
9
- bad name. I really like the meaningful name to the file that I have. This make it easy to search for them
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 possible to rename in bulk and recursively.
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 (currently only pdf, epub, mobi) using the available
15
- meta-data that embedded within the ebook.
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
- * This gem should work on OSX/Linux like system. It may work with Windows system but I can't confirm
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
- I, [2014-04-05T17:28:10.683671 #79795] INFO -- : Your options: {:base_dir=>"test/fixtures/ebooks/", :meta_binary=>"ebook-meta", :recursive=>true, :commit=>false}
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
@@ -1,3 +1,3 @@
1
1
  module EbookRenamer
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebook_renamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan