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:
parent
f21c1f725d
commit
cf19888209
5
Makefile
5
Makefile
|
@ -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
|
||||
|
||||
|
|
19
examples/htmlbook.gamebook
Normal file
19
examples/htmlbook.gamebook
Normal 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.
|
1
examples/htmlbook.gamebook.options
Normal file
1
examples/htmlbook.gamebook.options
Normal file
|
@ -0,0 +1 @@
|
|||
--option htmlbook
|
1
options/htmlbook/html/add.html
Normal file
1
options/htmlbook/html/add.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/atleast.html
Normal file
1
options/htmlbook/html/atleast.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/auto.html
Normal file
0
options/htmlbook/html/auto.html
Normal file
17
options/htmlbook/html/begin.html
Normal file
17
options/htmlbook/html/begin.html
Normal 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>
|
1
options/htmlbook/html/collect.html
Normal file
1
options/htmlbook/html/collect.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/collections.html
Normal file
0
options/htmlbook/html/collections.html
Normal file
0
options/htmlbook/html/collectiontemplate.html
Normal file
0
options/htmlbook/html/collectiontemplate.html
Normal file
1
options/htmlbook/html/cost.html
Normal file
1
options/htmlbook/html/cost.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/count.html
Normal file
1
options/htmlbook/html/count.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/counters.html
Normal file
1
options/htmlbook/html/counters.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
options/htmlbook/html/countertemplate.html
Normal file
1
options/htmlbook/html/countertemplate.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
options/htmlbook/html/dec.html
Normal file
1
options/htmlbook/html/dec.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/drop.html
Normal file
1
options/htmlbook/html/drop.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
3
options/htmlbook/html/end.html
Normal file
3
options/htmlbook/html/end.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
</section>
|
||||
</body>
|
||||
</html>
|
0
options/htmlbook/html/endscript.html
Normal file
0
options/htmlbook/html/endscript.html
Normal file
1
options/htmlbook/html/found.html
Normal file
1
options/htmlbook/html/found.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/has.html
Normal file
1
options/htmlbook/html/has.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/hasnot.html
Normal file
1
options/htmlbook/html/hasnot.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/hideintro.html
Normal file
0
options/htmlbook/html/hideintro.html
Normal file
4
options/htmlbook/html/img.html
Normal file
4
options/htmlbook/html/img.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<figure>
|
||||
<img src="%(inner)s"/>
|
||||
</figure>
|
||||
|
1
options/htmlbook/html/inc.html
Normal file
1
options/htmlbook/html/inc.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/init.html
Normal file
1
options/htmlbook/html/init.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
5
options/htmlbook/html/introsection.html
Normal file
5
options/htmlbook/html/introsection.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<section data-type="sect1" class="sect1">
|
||||
<h1>%(name)s</h1>
|
||||
<p>%(text)s</p>
|
||||
</section>
|
||||
|
1
options/htmlbook/html/lessthan.html
Normal file
1
options/htmlbook/html/lessthan.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/min.html
Normal file
1
options/htmlbook/html/min.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/morethan.html
Normal file
1
options/htmlbook/html/morethan.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
1
options/htmlbook/html/named_section_ref.html
Normal file
1
options/htmlbook/html/named_section_ref.html
Normal file
|
@ -0,0 +1 @@
|
|||
<a href="#section%(nr)d">%(name)s</a>
|
1
options/htmlbook/html/random.html
Normal file
1
options/htmlbook/html/random.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/script.html
Normal file
0
options/htmlbook/html/script.html
Normal file
4
options/htmlbook/html/section.html
Normal file
4
options/htmlbook/html/section.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<section data-type="sect1" class="sect1" id="section%(nr)d">
|
||||
<h1>%(nr)d</h1>
|
||||
<p>%(text)s</p>
|
||||
</section>
|
1
options/htmlbook/html/section_ref.html
Normal file
1
options/htmlbook/html/section_ref.html
Normal file
|
@ -0,0 +1 @@
|
|||
<a href="#section%(nr)d">%(nr)d</a>
|
1
options/htmlbook/html/sections_begin.html
Normal file
1
options/htmlbook/html/sections_begin.html
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
options/htmlbook/html/set.html
Normal file
1
options/htmlbook/html/set.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/showintro.html
Normal file
0
options/htmlbook/html/showintro.html
Normal file
1
options/htmlbook/html/take.html
Normal file
1
options/htmlbook/html/take.html
Normal file
|
@ -0,0 +1 @@
|
|||
%(inner)s
|
0
options/htmlbook/html/viewport.html
Normal file
0
options/htmlbook/html/viewport.html
Normal file
0
options/htmlbook/html/xor.html
Normal file
0
options/htmlbook/html/xor.html
Normal file
Loading…
Reference in a new issue