bookmaker 0.6.0 → 0.7.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
- module Bookmaker
2
- VERSION = "0.6.0"
1
+ class Bookmaker
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 7
5
+ PATCH = 0
6
+ BUILD = 'pre3'
7
+
8
+ STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
+ end
3
10
  end
File without changes
File without changes
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Cover</title>
5
+ <style type="text/css"> img { max-width: 100%; } </style>
6
+ </head>
7
+ <body>
8
+ <div id="cover-image">
9
+ <img src="<%=epub_cover%>" alt="Cover Image for <%=title %>"/>
10
+ </div>
11
+ </body>
12
+ </html>
File without changes
File without changes
@@ -0,0 +1,46 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Copyright Page</title>
5
+ <style type="text/css"> img { max-width: 100%; } </style>
6
+ </head>
7
+ <body>
8
+ <div class="copyright">
9
+ <h2 class="no-toc"><%= title %></h2>
10
+ <% if type == 'fiction' %>
11
+ <p>This is a work of fiction. Names, characters, places and incidents are either
12
+ the product of the author's imagination or are used fictitiously, and any resemblance to
13
+ actual persons, living or dead, business establishments, events or locales is entirely
14
+ coincidental.</p>
15
+ <% end %>
16
+
17
+ <p><em><%= copyright.gsub("(C)", "&copy;") %></em></p>
18
+
19
+ <% unless designer['cover'].nil? || designer['cover'].empty? %>
20
+ <p> Cover Design by <%= designer['cover'] %></p>
21
+ <% end %>
22
+
23
+ <% unless designer['book'].nil? || designer['book'].empty? %>
24
+ <p> Book Design by <%= designer['book'] %></p>
25
+ <% end %>
26
+
27
+ <% unless editors['text'].nil? || editors['text'].empty? %>
28
+ <p> Edited by <%= editors['text'].join(',') %></p>
29
+ <% end %>
30
+
31
+
32
+ <p> All rights reserved.</p>
33
+
34
+ <p> No part of this publication may be reproduced, stored in a retrieval system, posted on the Internet, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior written permission from the author. The only exception is by a reviewer, who may quote short excerpts in a review.</p>
35
+
36
+ <p> Visit my website at <%= "<a href='#{base_url}'>#{base_url}</a>" %></p>
37
+
38
+ <p> Printed in the United States of America</p>
39
+
40
+ <p><em>First Printing, <%= published_at %></em></p>
41
+
42
+ <p> <%= identifier['type'] %> <%= identifier['id'] %></p>
43
+
44
+ </div>
45
+ </body>
46
+ </html>
File without changes
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Reader Page</title>
5
+ <style type="text/css"> img { max-width: 100%; } </style>
6
+ </head>
7
+ <body>
8
+ <div class="copyright">
9
+ <h2 class="no-toc">I'd like your feedback</h2>
10
+
11
+ <p>Dear Reader,</p>
12
+ <p>I would like to thank you for downloading this book and giving it a read. I would love to read your feedback as I try to improve this series and my writing.</p>
13
+
14
+ <p>Just send an email to: <%= "<a href='mailto:feedback@dausha.net?subject=#{title.gsub(' ','%20')}-#{Date.today}%20Feedback'>feedback@dausha.net</a>" %></p>
15
+
16
+ <p>You can also visit my Facebook page: <a href='https://www.facebook.com/pages/Ben-Wilson-Author/143743165675224'>Ben Wilson, Author</a>, where you can get updates as well.</p>
17
+
18
+ <p>Version Date: <%= Date.today %></p>
19
+ </div>
20
+ </body>
21
+ </html>
File without changes
@@ -0,0 +1,415 @@
1
+ \NeedsTeXFormat{LaTeX2e}[1996/06/01]
2
+ \documentclass[11pt,twoside,makeidx,hidelinks,<%= (status == 'final') ? '' : 'showtrims' %>]{memoir}
3
+ \usepackage{layouts}[2001/04/29]
4
+ <%= (status == 'final') ? '\def\isfinal{1}' : '' %>
5
+
6
+ % Packages
7
+ %=========
8
+ \usepackage{verbatim}
9
+ \usepackage[colorlinks=false]{hyperref}
10
+ % \usepackage[utf8x]{inputenc}
11
+ \usepackage{
12
+ fancyvrb,
13
+ graphics,
14
+ url,
15
+ rotating,
16
+ lipsum,
17
+ microtype,
18
+ fancybox,
19
+ glossaries,
20
+ titling,
21
+ xspace,
22
+ }
23
+ \renewcommand*{\thefootnote}{\fnsymbol{footnote}}
24
+ \input{./extras/characters.tex}
25
+
26
+ % Boolean-ness
27
+ %=============
28
+ \newcommand{\onlyfinal}[1]{\ifdefined\isfinal{#1}\fi}%
29
+ \newcommand{\notfinal}[1]{\ifdefined\isfinal\else{#1}\fi}%
30
+ \newcommand{\whenfinal}[2]{%
31
+ \ifdefined\isfinal%
32
+ #1%
33
+ \else%
34
+ #2%
35
+ \fi}%
36
+
37
+ %
38
+ % Page Layout
39
+ %============
40
+ <%
41
+ if status == 'final'
42
+ stock_size = [9, 6]
43
+ trims = [0, 0]
44
+ else
45
+ stock_size = [11 , 8.5]
46
+ trims = [0.8, 0.5]
47
+ end
48
+ ul_margin = [0.8, 0.5]
49
+ lr_margin = [0.8, 0.6]
50
+ type_block = [(9 - ul_margin.sum), (6 - lr_margin.sum)]
51
+
52
+ %>
53
+ <%= (status == 'final') ? '' : '\trimFrame' %>
54
+ \setstocksize{<%=stock_size[0]%>in}{<%=stock_size[1]%>in}
55
+ \setulmarginsandblock{0.8in}{0.5in}{*}
56
+ \settrims{<%=trims[0]%>in}{<%=trims[1]%>in}
57
+ \setlrmarginsandblock{0.8in}{0.5in}{*}
58
+ \settrimmedsize{9in}{6in}{*}
59
+ \settypeblocksize{<%=type_block[0]%>in}{<%=type_block[1]%>in}{*}
60
+
61
+ \setmarginnotes{0.1pt}{0.2in}{\onelineskip}
62
+ \setheadfoot{\onelineskip}{2\onelineskip}
63
+ \setheaderspaces{*}{2\onelineskip}{*}
64
+ \linespread{1.15}
65
+
66
+ \checkandfixthelayout
67
+
68
+ \setlength{\headsep}{8pt}
69
+
70
+ \newlength{\AfterFancyBreakMin}
71
+ \setlength{\AfterFancyBreakMin}{3\baselineskip}
72
+ \setlength{\parindent}{1.5 em}
73
+ \makeatletter
74
+ \g@addto@macro\quote{\linespread{1}\small{}}
75
+ \g@addto@macro\quotation{\linespread{1}\small{}}
76
+ \g@addto@macro\caption{\linespread{1}\footnotesize{}}
77
+ \makeatother
78
+ \tolerance 1414
79
+ \hbadness 1414
80
+ \setlength{\emergencystretch}{3em}
81
+ \righthyphenmin 62
82
+ \emergencystretch 1.5em
83
+ \hfuzz 0.3pt
84
+ \widowpenalty=10000
85
+ \clubpenalty=10000
86
+ \setlength{\parindent}{1.5 em}
87
+
88
+ % Page Heading
89
+ %-------------
90
+ \makepagestyle{ebook}
91
+ \makeoddhead{ebook}{}{\textsf\theauthor}{\normalfont\thepage}
92
+ \makeevenhead{ebook}{\normalfont\thepage}{\textsf \thetitle}{}
93
+
94
+ \aliaspagestyle{title}{empty}
95
+
96
+ % Text Tweaks
97
+ %-------------
98
+ \def\thinspace{\kern .16667em }
99
+ \newcommand{\ellip}{\ldots}
100
+ \newcommand{\Dash}{\thinspace---\thinspace}
101
+ \newcommand{\dash}{\tk{--Wrong Dash--}}
102
+
103
+ % Fonts
104
+ %------
105
+ \usepackage{fontspec}
106
+ \usepackage{xunicode}
107
+ \usepackage{xltxtra}
108
+ \defaultfontfeatures{Mapping=tex-text}
109
+ \setmainfont{<%= fonts['serif'] %>}
110
+ \setsansfont{<%= fonts['sans'] %>}
111
+ \setmonofont{<%= fonts['mono'] %>}
112
+ \newfontinstance\scshape[Letters=SmallCaps, Numbers=Uppercase]{<%= fonts['small_caps'] || fonts['mono'] %>}
113
+ \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
114
+ \ifdefined\disableligature
115
+ \DisableLigatures[f]{encoding = *, family = * }
116
+ \fi
117
+
118
+ % Dates
119
+ %-------
120
+ \usepackage{datetime}
121
+ \newdateformat{yearonly}{\THEYEAR}
122
+ \newdateformat{usmonthyear}{\monthname[\THEMONTH], \THEYEAR}
123
+ \newcommand{\monthyear}{%
124
+ \ifcase\month\or January\or February\or March\or April\or May\or June\or
125
+ July\or August\or September\or October\or November\or
126
+ December\fi\space\number\year
127
+ }
128
+
129
+ % Document Headings
130
+ %==================
131
+
132
+ % Chapter
133
+ %-----------
134
+ \setsecheadstyle{\bfseries\large\centering}
135
+ \newcounter{renewsection}
136
+ \newcommand{\Chapter}[1]{
137
+ \setcounter{renewsection}{\value{section}}
138
+ \chapter{}
139
+ %\chapter{#1}
140
+ \setcounter{section}{\value{renewsection}}
141
+ }
142
+ \chapterstyle{<%= chapter_style || 'ell'%>}
143
+
144
+
145
+ % Section
146
+ %---------
147
+ \renewcommand{\thesection}{\arabic{section}.}
148
+
149
+ % Novel Tweaks
150
+ %=============
151
+
152
+ \newenvironment{xdedication}%
153
+ {\vspace*{6ex}\begin{quotation}\begin{center}\begin{em}}%
154
+ {\par\end{em}\end{center}\end{quotation}}%
155
+
156
+ \newenvironment{dedication}
157
+ {\clearpage % we want a new page
158
+ \thispagestyle{empty}% no header and footer
159
+ \vspace*{\stretch{1}}% some space at the top
160
+ \itshape % the text is in italics
161
+ \raggedleft % flush to the right margin
162
+ }
163
+ {\par % end the paragraph
164
+ \vspace{\stretch{3}} % space at bottom is three times that at the top
165
+ \clearpage % finish off the page
166
+ }
167
+
168
+ % Scene Formatting
169
+ %-----------------
170
+
171
+ \newcommand*\thoughtbreak{
172
+ \begin{center}
173
+ \vspace{1cm}
174
+ \noindent\rule{0.5\textwidth}{0.4pt}
175
+ \vspace{1cm}
176
+ \end{center}
177
+ }
178
+
179
+ \newcommand{\thought}[1]{\emph{#1}}
180
+ \newcommand{\email}[1]{\texttt{#1}}
181
+ \newcommand{\status}[1]{\notfinal{\textbf{Status:} #1\newline}}
182
+ \newcommand{\synopsis}[1]{\notfinal{\line(1,0){320}\newline\textbf{What's going on here?} #1\newline
183
+ \line(1,0){320}\newline}}
184
+ \newcommand{\slug}[1]{\notfinal{\MakeUppercase{#1}\newline\newline}}
185
+ \newcommand{\slugline}[2]{\notfinal{\section{#1}}\onlyfinal{\section{}}\slug{#2}}
186
+ \newcommand{\interlude}[1]{\plainfancybreak{\AfterFancyBreakMin}{1}{#1}}
187
+
188
+ % \newcommand{\scene}[3]{%
189
+ % \notfinal{\section{#1}\slug{#2}}
190
+ % \input{#3}
191
+ % \pbreak
192
+ % }%
193
+
194
+ \newcommand{\smee}[1]{\${-} \textsc{\small#1}}
195
+ \whenfinal%
196
+ {\newcommand{\pbreak}{\pfbreak}}%
197
+ {\newcommand{\pbreak}{\begin{center} \# \# \# \end{center}}}
198
+
199
+ % \renewcommand{\pbreak}{\thoughtbreak}
200
+ % Series Title Page
201
+ %==================
202
+ \def\seriestitle#1{\def\theseriestitle{\uppercase{#1}}}
203
+ \def\seriespage{\thispagestyle{empty}
204
+ \begin{center}
205
+ \noindent{\large\theseriestitle}
206
+ \vskip10.5pt
207
+ \noindent Other Books in the series:
208
+ \vskip4pt
209
+ \theseriesbooks
210
+ \end{center}\cleardoublepage}
211
+ \def\seriesbook#1{\vskip.5pt{\noindent\hskip8pt\emph{#1}}\vskip1sp}
212
+ \def\seriesbooks#1\endseriesbooks{\def\theseriesbooks{\let\book\seriesbook{#1}}}
213
+
214
+ % Indices
215
+ %=========
216
+ \makeglossary
217
+ \makeindex
218
+ \let\oldindex\index{}%
219
+ \newcommand{\marked}[1]{\whenfinal{#1}{\underline{#1}}}%
220
+ \renewcommand{\index}[1]{\oldindex{#1}\marked{#1}}%
221
+ \newcommand{\Index}[2]{\oldindex{#1}\marked{#2}}%
222
+ \newcommand{\orbital}[1]{\oldindex{Orbital!#1}\marked{#1}}%
223
+ \newcommand{\equipment}[1]{\oldindex{Equipment!#1}\marked{#1}}%
224
+ \newcommand{\Equipment}[2]{\oldindex{Equipment!#1}\marked{#2}}%
225
+ \newcommand{\System}[2]{\oldindex{System!#1}\marked{#2}}%
226
+ \newcommand{\system}[1]{\oldindex{System!#1}\marked{#1}}%
227
+ \newcommand{\character}[1]{\oldindex{Character!#1}\marked{#1}}%
228
+ \newcommand{\Character}[2]{\oldindex{Character!#1}\marked{#2}}%
229
+ \newcommand{\ship}[1]{\oldindex{Ship!#1}\marked{\emph{#1}}}%
230
+ \newcommand{\Ship}[1]{\oldindex{Ship!#1}\marked{\emph{#1}}}%
231
+ \newcommand{\location}[1]{\oldindex{Location!#1}\marked{#1}}%
232
+ \newcommand{\Location}[2]{\oldindex{Location!#1}\marked{#2}}%
233
+ \newcommand{\clin}[1]{\oldindex{Clin!#1}Clin \marked{#1}}%
234
+
235
+ % Book-Specific Metadata
236
+ %========================
237
+
238
+ \def\NextBook{<%=next_book%>}
239
+ \def\ReturningCharacters{<%=returning_characters%>}
240
+ \title{<%= title %>}
241
+ \author{<%= authors.join(', ') %>}
242
+ \date{<%= published_at %>}
243
+ \newdate{firstprint}{<%= published_at.split('-')[2]%>}{<%= published_at.split('-')[1]%>}{<%= published_at.split('-')[0]%>}
244
+
245
+ <% unless series.nil? or series['books'].nil? %>
246
+ \seriestitle{<%= series['title'] %>}
247
+ \seriesbooks
248
+ <%= series['books'].map{ |b| "\\book{#{b}}" }.join("\n ") %>
249
+ \endseriesbooks
250
+ <% end %>
251
+
252
+ % Drafting Help
253
+ %==============
254
+ \newcommand{\tk}[1]{%
255
+ \ifdefined\isdraft%
256
+ % \textbf{TK-#1}
257
+ \todo{#1}\textbf{TK-#1}%
258
+ \else%
259
+ \textbf{TK-#1}%
260
+ % \todo{#1}\textbf{TK-#1}
261
+ \fi%
262
+ }%
263
+ \newcommand{\TK}[1]{\tk{BAD-TK--#1}}
264
+
265
+ % Document
266
+ %========================
267
+ \begin{document}
268
+
269
+ % Frontmatter
270
+ %-------------
271
+ \frontmatter
272
+ % r.1 - Half-Title
273
+ \begin{titlingpage}
274
+ \pagestyle{empty}
275
+ \begin{center}
276
+ \vspace*{2in}
277
+
278
+ \Huge\textbf{\textsf\thetitle}
279
+
280
+ \vspace*{0.75in}
281
+
282
+ \Large\textsf\theauthor
283
+
284
+ \vspace*{\fill}
285
+ \end{center}
286
+ \end{titlingpage}
287
+
288
+ % r.2 - Series Title Page
289
+ <%= "\\seriespage" unless series.nil? %>
290
+ \newpage
291
+ % r.3 Titlepage
292
+ \begin{titlingpage}
293
+ \pagestyle{empty}
294
+ \begin{center}
295
+ \vspace*{\fill}
296
+
297
+ \HUGE\textbf{\textsf\thetitle}
298
+
299
+ \vspace*{0.25in}
300
+ \line(1,0){150}
301
+ \vspace*{0.25in}
302
+
303
+ \Large\textsf\theauthor
304
+
305
+ \vspace*{\fill}
306
+
307
+ \vspace*{\fill}
308
+ \includegraphics[width=0.75in]{images/dp-logo.png}\\[0cm]
309
+ \hspace*{\fill}\textsf{Dausha}\hspace*{\fill}\newline%
310
+ \textsf{Publishing}
311
+ \end{center}
312
+ \end{titlingpage}
313
+
314
+ % r.4 Copyright Page
315
+ \vspace*{\fill}
316
+ \pagestyle{empty}
317
+
318
+ \par\noindent\emph{\thetitle}
319
+ \newline
320
+
321
+ <% if type == 'fiction' %>
322
+
323
+ \par\noindent This is a work of fiction. Names, characters, places and incidents are either
324
+ the product of the author's imagination or are used fictitiously, and any resemblance to
325
+ actual persons, living or dead, business establishments, events or locales is entirely
326
+ coincidental.\newline
327
+ <% end %>
328
+
329
+ \par\noindent\emph{<%= copyright %>}\newline
330
+
331
+ <% unless designer['cover'].nil? || designer['cover'].empty? %>
332
+ \par\noindent Cover Design by <%= designer['cover'] %>\newline
333
+ <% end %>
334
+
335
+ <% unless designer['book'].nil? || designer['book'].empty? %>
336
+ \par\noindent Book Design by <%= designer['book'] %>\newline
337
+ <% end %>
338
+
339
+ <% unless editors['text'].nil? || editors['text'].empty? %>
340
+ \par\noindent Book Design by <%= editors['text'].join(',') %>\newline
341
+ <% end %>
342
+
343
+
344
+ \par\noindent All rights reserved.\newline
345
+
346
+ \par\noindent No part of this publication may be reproduced, stored in a retrieval system, posted on the Internet, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior written permission from the author. The only exception is by a reviewer, who may quote short excerpts in a review.\newline
347
+
348
+ \par\noindent \theauthor
349
+ \par\noindent Visit my website at \url{<%= base_url %>}\newline
350
+
351
+ \par\noindent Printed in the United States of America
352
+ \newline
353
+
354
+ \par\noindent\textit{First Printing, \usmonthyear\displaydate{firstprint}}
355
+ \newline
356
+
357
+ \par\noindent <%= identifier['type'] %> <%= identifier['id'] %>
358
+ \vspace*{\fill}
359
+
360
+ % r.5 - Dedication
361
+ <%= "\\begin{dedication}\n#{File.open('extras/dedication.tex').read}\\end{dedication}" if File.exist?('extras/dedication.tex')
362
+ %>
363
+ <%= (status != 'final') ? '\tableofcontents' : '' %>
364
+
365
+
366
+ \newpage
367
+ \mainmatter
368
+ \pagestyle{ebook}
369
+ \sloppy
370
+
371
+ <%= contents %>
372
+
373
+ % Back Matter
374
+ %-------------
375
+ \backmatter
376
+
377
+ %% Bibliography
378
+ % \bibliographystyle{\mybibliostyle}
379
+ % \bibliocommand
380
+ % \pagestyle{empty}
381
+ \begin{center}
382
+ \vspace*{\fill}
383
+
384
+ {\Large \par
385
+ \noindent Thank you for reading
386
+
387
+ \vspace*{0.125in}
388
+ {\LARGE\textbf{\textsf{\thetitle}}}
389
+ \vspace*{0.125in}
390
+
391
+ \ifdefined\ReturningCharacters
392
+ \par
393
+ \noindent\ReturningCharacters{} will return in \emph{\NextBook}.} \vspace*{\fill}
394
+ \fi
395
+
396
+ {\LARGE\textbf{\textsf{Follow Me}}}
397
+
398
+ \vspace*{0.125in}
399
+
400
+ \textbf{\theauthor{}} can be followed on Twitter and Facebook.
401
+ \newline Visit his web site at http://dausha.net for more information. You can also sign up for announcements of other books in this series at http://dausha.net.
402
+
403
+ \vspace*{\fill}
404
+ \end{center}
405
+
406
+ <% if (type == 'fiction' and status != 'final') or type == 'nonfiction' %>
407
+
408
+ %% Glossary
409
+ \printglossaries
410
+
411
+ %% Index
412
+ \printindex
413
+ <% end %>
414
+
415
+ \end{document}