booksmith 1.0.0

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.
@@ -0,0 +1,99 @@
1
+ ---
2
+ :title: "My Book"
3
+ :author: Authored by Author Name
4
+
5
+ # Font families (must match a registered Prawn font family name).
6
+ :title_font: "Noto Sans Mono"
7
+ :author_font: "Noto Sans Mono"
8
+ :header_font: "Noto Sans"
9
+ :subtitle_font: "Noto Sans Mono"
10
+ :body_font: "Noto Sans"
11
+
12
+ # Insert a blank page between the cover and the first chapter.
13
+ :blank_page_after_cover: true
14
+
15
+ # Show a table of contents after the blank page.
16
+ :table_of_contents: true
17
+
18
+ # Body text size used throughout the book.
19
+ :font_size: 10.0
20
+
21
+ # Explicit header font sizes (Markdown: #, ##, ###, ####).
22
+ :title_font_size: 24
23
+ :author_font_size: 18
24
+ :title_author_spacing: 20
25
+
26
+ :h1_font_size: 20
27
+ :h2_font_size: 18
28
+ :h3_font_size: 14
29
+ :h4_font_size: 12
30
+
31
+ :line_height: 1.5
32
+ # PNG flatten color for inline images on the page background.
33
+ :image_flatten_bg_color: "FFFFFF"
34
+ :page_numbers: true
35
+ :page_number_font_size: 9
36
+ # Extra space above the page numbers reserved from body text.
37
+ :page_content_bottom_gap: 30
38
+
39
+ # Subtitle font size (points). The subtitle is set via an HTML comment after the chapter title.
40
+ :subtitle_font_size: 12
41
+ # Whether subtitle text should be bold.
42
+ :subtitle_bold: false
43
+
44
+ # Space (in points) after a chapter title when no subtitle is present.
45
+ :title_spacing_after: 20
46
+ # Space (in points) after a subtitle line.
47
+ :subtitle_spacing_after: 15
48
+
49
+ # List layout
50
+ :list_bullet_indent: 7 # left indent per nesting level for bullet lists (points)
51
+ :list_number_indent: 9 # left indent per nesting level for numbered lists (points)
52
+ :list_bullet_offset: 10 # bullet overhang left of text edge (points)
53
+ :list_marker_gap: 4 # space between marker (e.g. "1.") and item text (points)
54
+ :list_item_spacing: 6 # vertical gap between items (points)
55
+ :list_margin_top: 1 # space before the list block (points)
56
+ :list_margin_bottom: 10 # space after the list block (points)
57
+
58
+ # Blockquote / callout box styling
59
+ :blockquote_bg_color: "EEEEEE" # hex grey, no leading #
60
+ :blockquote_image_flatten_bg_color: "EEEEEE"
61
+ :blockquote_padding: 12 # default when per-side values are omitted (points)
62
+ :blockquote_padding_left: 12
63
+ :blockquote_padding_right: 12
64
+ :blockquote_padding_top: 20
65
+ :blockquote_padding_bottom: 10
66
+ :blockquote_margin_top: 10 # space above the box (points)
67
+ :blockquote_margin_bottom: 10 # space below the box (points)
68
+ :blockquote_header_font_size: 14 # bold first line when wrapped in ** **
69
+ :blockquote_header_gap: 6 # space between bold header and body
70
+
71
+ # Alternate blockquote styling
72
+ :alt_blockquote_bg_color: "F5F5F5" # hex grey, no leading #
73
+ :alt_blockquote_image_flatten_bg_color: "F5F5F5"
74
+ :alt_blockquote_padding_left: 12
75
+ :alt_blockquote_padding_right: 12
76
+ :alt_blockquote_padding_top: 18
77
+ :alt_blockquote_padding_bottom: 8
78
+ :alt_blockquote_margin_top: 10 # space above the box (points)
79
+ :alt_blockquote_margin_bottom: 10 # space below the box (points)
80
+ :alt_blockquote_header_font_size: 14
81
+ :alt_blockquote_header_gap: 6
82
+
83
+ # Exercise blockquote block
84
+ :exercise_blockquote_bg_color: "EEF3FF"
85
+ :exercise_blockquote_image_flatten_bg_color: "EEF3FF"
86
+ :exercise_blockquote_padding: 14
87
+ :exercise_blockquote_padding_left: 12
88
+ :exercise_blockquote_padding_right: 16
89
+ :exercise_blockquote_padding_top: 18
90
+ :exercise_blockquote_padding_bottom: 10
91
+ :exercise_blockquote_margin_top: 12
92
+ :exercise_blockquote_margin_bottom: 12
93
+ :exercise_blockquote_image: "assets/clock.png"
94
+ :exercise_blockquote_image_width: 18
95
+ :exercise_blockquote_image_height: 18
96
+ :exercise_blockquote_image_gap: 8
97
+ :exercise_blockquote_image_voffset: -2 # vertical nudge for icon alignment (points; positive = up)
98
+ :exercise_blockquote_header_font_size: 14
99
+ :exercise_blockquote_header_gap: 6
Binary file
metadata ADDED
@@ -0,0 +1,167 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: booksmith
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Leonid Medovyy
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: commander
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '4.6'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '4.6'
26
+ - !ruby/object:Gem::Dependency
27
+ name: gepub
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '1.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: kramdown
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '2.4'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '2.4'
54
+ - !ruby/object:Gem::Dependency
55
+ name: ostruct
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: prawn
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '2.4'
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '2.4'
82
+ - !ruby/object:Gem::Dependency
83
+ name: bundler
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '2.0'
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '2.0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rake
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 12.3.3
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 12.3.3
110
+ description: Converts Markdown chapters into a styled PDF or EPUB book using Prawn,
111
+ GEPUB, and Kramdown.
112
+ email:
113
+ - leonid@storypro.io
114
+ executables:
115
+ - booksmith
116
+ extensions: []
117
+ extra_rdoc_files: []
118
+ files:
119
+ - Gemfile
120
+ - LICENSE.txt
121
+ - README.md
122
+ - Rakefile
123
+ - bin/booksmith
124
+ - bin/console
125
+ - bin/setup
126
+ - booksmith.gemspec
127
+ - lib/booksmith.rb
128
+ - lib/booksmith/blockquotes.rb
129
+ - lib/booksmith/book_generator.rb
130
+ - lib/booksmith/epub_generator.rb
131
+ - lib/booksmith/font_paths.rb
132
+ - lib/booksmith/headers.rb
133
+ - lib/booksmith/images.rb
134
+ - lib/booksmith/lists.rb
135
+ - lib/booksmith/text.rb
136
+ - lib/booksmith/version.rb
137
+ - lib/fonts/NotoSans-Bold.ttf
138
+ - lib/fonts/NotoSans-BoldItalic.ttf
139
+ - lib/fonts/NotoSans-Italic.ttf
140
+ - lib/fonts/NotoSans-Regular.ttf
141
+ - lib/fonts/NotoSansMono-Bold.ttf
142
+ - lib/fonts/NotoSansMono-Regular.ttf
143
+ - lib/templates/01_introduction.md
144
+ - lib/templates/book.yml
145
+ - lib/templates/clock.png
146
+ homepage: https://github.com/leouofa/booksmith
147
+ licenses:
148
+ - MIT
149
+ metadata: {}
150
+ rdoc_options: []
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: 3.0.0
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ requirements: []
164
+ rubygems_version: 4.0.14
165
+ specification_version: 4
166
+ summary: A flexible Markdown-to-PDF and EPUB book publishing tool
167
+ test_files: []