2013-05-29 00:28:13 +03:00
|
|
|
* gamebookformat
|
|
|
|
|
|
|
|
A tool to format [[http://www.gamebooks.org/][gamebooks]] into various formats useful for playing the
|
|
|
|
gamebook on paper or a screen (or for debugging it).
|
|
|
|
|
2013-06-04 01:27:32 +03:00
|
|
|
** Usage
|
|
|
|
: formatgamebook.py [-h] [-M] [-t D] inputfile [inputfile ...] outputfile
|
|
|
|
:
|
|
|
|
: positional arguments:
|
2013-06-05 01:19:57 +03:00
|
|
|
: inputfile input gamebook file (eg test.gamebook)
|
2013-06-04 01:27:32 +03:00
|
|
|
: outputfile output file (eg test.tex or test.rtf)
|
|
|
|
:
|
|
|
|
: optional arguments:
|
|
|
|
: -h, --help show this help message and exit
|
2013-06-17 00:43:45 +03:00
|
|
|
: -i T, --include T only include sections with tag
|
2013-06-04 01:27:32 +03:00
|
|
|
: -M, --no-default-map ignore default map file
|
|
|
|
: -t D, --template D add custom template dir
|
2013-06-16 23:24:38 +03:00
|
|
|
: -S, --no-shuffle do not shuffle sections
|
2013-06-04 01:27:32 +03:00
|
|
|
|
2013-05-30 01:18:05 +03:00
|
|
|
** Supported Output Formats
|
|
|
|
|
2013-06-14 08:02:43 +03:00
|
|
|
| Name | Extension | Description |
|
|
|
|
|------------------+-----------+-----------------------------------------------------------------------------------------------|
|
|
|
|
| LaTeX | .tex | Useful to generate PDFs using pdflatex or whatever LaTeX tools you prefer. |
|
|
|
|
| Rich Text Format | .rtf | Supported because the [[http://www.arborell.com/windhammer_prize.html][Windhammer Prize]] requires it. |
|
|
|
|
| Graphviz DOT | .dot | Use with the Graphviz dot tool to generate a flowchart graph of all sections in the gamebook. |
|
|
|
|
| HTML | .html | Play gamebook in browser. |
|
|
|
|
| Plain Text | .txt | Raw plain text without formatting. |
|
|
|
|
| Debug Plain Text | .debug | Plain text debug output of gamebook contents. |
|
2013-05-30 01:18:05 +03:00
|
|
|
|
|
|
|
More to be added.
|
|
|
|
|
|
|
|
** Gamebook Format
|
|
|
|
|
|
|
|
The input file expected by the formatgamebook.py script must be in a
|
2013-06-03 22:57:55 +03:00
|
|
|
format containing information about all sections in the book
|
2013-05-30 01:18:05 +03:00
|
|
|
plus some optional metadata. The format should (when TBD) be documented
|
2013-06-05 01:19:57 +03:00
|
|
|
here.
|
|
|
|
|
|
|
|
By design the format is similar enough to [[http://orgmode.org][Emacs Org-Mode]]
|
|
|
|
that some edit shortcuts works in that mode without additional
|
|
|
|
configuration (eg /C-c C-q/ to edit section tags).
|
|
|
|
References to sections can be followed using
|
|
|
|
/C-c C-o/ while editing the book in org-mode.
|
2013-05-30 01:18:05 +03:00
|
|
|
|
2013-06-16 10:41:32 +03:00
|
|
|
** Dependencies
|
|
|
|
|
|
|
|
*** Required
|
|
|
|
- Python 2.7 :: To run formatgamebook.py.
|
|
|
|
|
|
|
|
*** Optional
|
|
|
|
To make something useful from some of the outputted files.
|
|
|
|
- pdflatex :: Make pdf from tex files.
|
|
|
|
- Graphviz :: Includes the dot command that can make images from dot files.
|
|
|
|
|
|
|
|
*** Development
|
|
|
|
The following are only needed for working on improving
|
|
|
|
the scripts (and even then you can proabbly do without all or most).
|
|
|
|
- GNU make :: Runs tests and various other useful development tasks.
|
|
|
|
(This in turn depends on some tools like diff, but if you
|
|
|
|
have make installed you probably have them as well.)
|
|
|
|
- node.js :: To run some tests of HTML (JavaScript) templates.
|
|
|
|
- nodeunit :: Unit test framework for node.js.
|
|
|
|
|
2013-05-29 00:28:13 +03:00
|
|
|
** License
|
|
|
|
|
2013-06-05 01:19:57 +03:00
|
|
|
Copyright (c) 2013 Pelle Nilsson
|
2013-05-29 00:28:13 +03:00
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are
|
|
|
|
met:
|
|
|
|
|
|
|
|
Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in
|
|
|
|
the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|