-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved make-book.sh to bin/, generated docs to /target, automated insert of cover image and title update for html.
- Loading branch information
1 parent
e760393
commit 868f5c5
Showing
4 changed files
with
29 additions
and
26 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
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,28 @@ | ||
#!/bin/bash | ||
|
||
# create the target directory for where the book will build | ||
rm -rf target | ||
mkdir target | ||
|
||
echo "*** Producing HTML ***" | ||
asciidoctor book/Practical-Gremlin.adoc -o target/Practical-Gremlin.html | ||
|
||
# asciidoctor won't properly insert the title image and reformatted title so we do | ||
# that manually here | ||
search_string="<h1>PRACTICAL GREMLIN: An Apache TinkerPop Tutorial<\/h1>" | ||
replace_string='<img src="PRACTICAL-GREMLIN-Revised-v2.png">\n<h1>PRACTICAL GREMLIN:<br\/>An Apache TinkerPop Tutorial<\/h1>' | ||
sed -i "s/$search_string/${replace_string}/g" "target/Practical-Gremlin.html" | ||
|
||
cp target/Practical-Gremlin.html target/index.html | ||
cp images/PRACTICAL-GREMLIN-Revised-v2.png target/ | ||
|
||
echo "*** Producing DOCBOOK ***" | ||
asciidoctor -n -b docbook -d book book/Practical-Gremlin.adoc -o target/krltemp.xml | ||
sed -e s/language=\"groovy\"/language=\"java\"/ target/krltemp.xml > target/Practical-Gremlin.xml | ||
rm target/krltemp.xml | ||
echo "*** Producing EPUB ***" | ||
pandoc -f docbook -t epub -N --number-sections --top-level-division=chapter --toc --toc-depth=4 target/Practical-Gremlin.xml -o target/Practical-Gremlin.epub | ||
echo "*** Producing MOBI ***" | ||
ebook-convert target/Practical-Gremlin.epub target/Practical-Gremlin.mobi | ||
echo "*** Producing PDF ***" | ||
asciidoctor-pdf book/Practical-Gremlin.adoc -o target/Practical-Gremlin.pdf |
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
This file was deleted.
Oops, something went wrong.