Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3bd404d
Showing
6 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.epub | ||
*.mobi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
book = yourbookname | ||
chapters = $(shell cat chapters.txt) | ||
|
||
epub: book | ||
|
||
book: $(book).epub | ||
|
||
mobi: $(book).mobi | ||
|
||
pdf: $(book).pdf | ||
|
||
$(book).mobi: $(book).epub | ||
kindlegen -verbose $(book).epub | ||
|
||
$(book).epub: $(chapters) epub.css | ||
pandoc -o $(book).epub title.txt $(chapters) --epub-metadata=metadata.xml --toc --toc-depth=2 --epub-stylesheet=epub.css | ||
|
||
$(book).pdf: $(book).epub | ||
ebook-convert $(book).epub $(book).pdf | ||
|
||
clean: | ||
rm -f $(book).{pdf,epub,mobi} | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* This defines styles and classes used in the book */ | ||
h1, h2, h3, h4, h5, h6, body { | ||
font-family: arail, helvetica, sans-serif; | ||
} | ||
body { margin: 5%; text-align: justify; font-size: medium; } | ||
code { font-family: monospace; } | ||
h1 { text-align: left; } | ||
h2 { text-align: left; } | ||
h3 { text-align: left; } | ||
h4 { text-align: left; } | ||
h5 { text-align: left; } | ||
h6 { text-align: left; } | ||
h1.title { } | ||
h2.author { } | ||
h3.date { } | ||
ol.toc { padding: 0; margin-left: 1em; } | ||
ol.toc li { list-style-type: none; margin: 0; padding: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:title id="main">YOUR TITLE HERE</dc:title> | ||
<meta refines="#main" property="title-type">main</meta> | ||
<dc:language>en-GB</dc:language> | ||
<dc:creator opf:file-as="SURNAME, FORENAME" opf:role="aut">FORENAME SURNAME</dc:creator> | ||
<dc:publisher>YOUR PUBLISHER HERE</dc:publisher> | ||
<dc:date opf:event="publication">YYYY-MM-DD</dc:date> | ||
<dc:rights>Copyright ©2014 by FORENAME SURNAME</dc:rights> | ||
</metadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
% YOUR TITLE HERE | ||
% AUTHOR NAME HERE |