my_ebook_pub 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/lib/my_ebook_pub.rb +2 -6
- data/lib/my_ebook_pub/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: a0ace64431505899e46b43330ab0dfdf2478f38c
|
4
|
+
data.tar.gz: ff62f40f8561dcd98820863715b3d0bfc38e6733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa664e5ce3ba84db5eb5aed8e66d89a128342185940fb4f22744bedb1f47ca2d9f08321b0eee8f40545290c2f447fb82b50bf274669f131803904a6f01bf3c6b
|
7
|
+
data.tar.gz: 43969dbb7945c8a956896f10424562a987b120fff71b6f225f06d33621ed2f4a3bee67f7e96bf61ae7057ce9869876ad6c7783c79e7e13841bbb12228edbaa94
|
data/README.md
CHANGED
@@ -44,6 +44,25 @@ output
|
|
44
44
|
Your project is ready for content!
|
45
45
|
```
|
46
46
|
|
47
|
+
### Writing Content
|
48
|
+
|
49
|
+
Content files:
|
50
|
+
- live in `content/chapters`
|
51
|
+
- can be named with alpha-numeric characters
|
52
|
+
- are ordered alphabetically
|
53
|
+
|
54
|
+
Table of Contents:
|
55
|
+
- are auto-generated with active links
|
56
|
+
- are numbered based on the order of files in `content/chapters`
|
57
|
+
|
58
|
+
Preface & Cover
|
59
|
+
- live in `content`
|
60
|
+
- are auto-included with the book rendering
|
61
|
+
|
62
|
+
Assets
|
63
|
+
- contain the font and styling used for the book
|
64
|
+
- can store images to be used in the book (e.g., art for the cover of the book)
|
65
|
+
|
47
66
|
### Generate
|
48
67
|
|
49
68
|
```sh
|
data/lib/my_ebook_pub.rb
CHANGED
@@ -94,16 +94,12 @@ HERE
|
|
94
94
|
|
95
95
|
def raw_content
|
96
96
|
content = ""
|
97
|
-
|
98
|
-
content << File.read(
|
97
|
+
Dir.glob("#{@location}/chapters/*.md").each do |chapter|
|
98
|
+
content << File.read(chapter)
|
99
99
|
end
|
100
100
|
content
|
101
101
|
end
|
102
102
|
|
103
|
-
def number_of_chapters
|
104
|
-
Dir.glob("#{@location}/chapters/[0-9].md").count + Dir.glob("#{@location}/chapters/[0-9][0-9].md").count
|
105
|
-
end
|
106
|
-
|
107
103
|
def content
|
108
104
|
@renderer_content.render(raw_content)
|
109
105
|
end
|
data/lib/my_ebook_pub/version.rb
CHANGED