1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-05-17 08:28:20 +03:00

Experimental HTMLBook support (--option htmlbook when generating HTML).

See https://github.com/oreillymedia/HTMLBook.
make xmllinthtmlbook to verify examples/htmlbook.html (requires HTMLBook cloned to parent directory).
Not really sure how to use this or if it is useful in practice.
This commit is contained in:
Pelle Nilsson 2013-11-19 19:02:13 +01:00
parent f21c1f725d
commit cf19888209
40 changed files with 80 additions and 1 deletions

View file

@ -65,6 +65,9 @@ unittests=$(wildcard test_*.py)
unittest: *.py
python2.7 -m unittest $(unittests:.py=)
xmllinthtmlbook: examples/htmlbook.html
xmllint --noout --schema ../HTMLBook/schema/htmlbook.xsd examples/htmlbook.html
upload: html png pdf rtf
if [ -n "$(uploadto)" ]; then \
scp examples/*.html examples/*.png examples/*.pdf examples/*.rtf \
@ -88,7 +91,7 @@ fixmes:
grep FIXME *.py
.PHONY: all clean fixmes uploadto expected checkexpected test unittest \
templatejstest
templatejstest xmllinthtmlbook
.PRECIOUS: %.tex %.dot

View file

@ -0,0 +1,19 @@
title = HTMLBook
= Introduction
This is an introduction.
This example gamebook is for testing the htmlbook option.
See https://github.com/oreillymedia/HTMLBook for more information about HTMLBook.
= More
This is another introduction section, just to see that formatting is correct when
there are more than one.
* start
This is the first section. From here you can go to the unnamed section [[second]]
or [[third][this named section]].
* second
Got to another section. Story ends here.
* third
Got to this section. Story ends here.

View file

@ -0,0 +1 @@
--option htmlbook

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml ../../HTMLBook/schema/htmlbook.xsd"
xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>%(title)s</title>
<meta name="%(title)s" content="text/html; charset=utf-8" />
</head>
<body data-type="book" class="book" id="htmlbook">
<section data-type="titlepage" class="titlepage">
<h1>%(title)s</h1>
<p data-type="author">%(author)s</p>
</section>
<section data-type="chapter" id="sections">
<h1>%(title)s</h1>

View file

@ -0,0 +1 @@
%(inner)s

View file

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@

View file

@ -0,0 +1 @@

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1,3 @@
</section>
</body>
</html>

View file

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

View file

@ -0,0 +1,4 @@
<figure>
<img src="%(inner)s"/>
</figure>

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1,5 @@
<section data-type="sect1" class="sect1">
<h1>%(name)s</h1>
<p>%(text)s</p>
</section>

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
%(inner)s

View file

@ -0,0 +1 @@
<a href="#section%(nr)d">%(name)s</a>

View file

@ -0,0 +1 @@
%(inner)s

View file

View file

@ -0,0 +1,4 @@
<section data-type="sect1" class="sect1" id="section%(nr)d">
<h1>%(nr)d</h1>
<p>%(text)s</p>
</section>

View file

@ -0,0 +1 @@
<a href="#section%(nr)d">%(nr)d</a>

View file

@ -0,0 +1 @@

View file

@ -0,0 +1 @@
%(inner)s

View file

View file

@ -0,0 +1 @@
%(inner)s

View file

View file