GHB Format - waffle-stomper/Ghostwriter GitHub Wiki
Ghostwriter Human-readable Book (.ghb) Format
Comments
Ghostwriter uses Java-style comments. These are allowed anywhere within a line, not just at the start.
Any line beginning with two forward-slashes (//) will be treated as a comment and ignored when loading the file.
Examples:
// This is a single-line comment
and that's how I broke my rib // This part will be ignored, but everything before the slashes will be included
Any text between the /* and */ symbols will also be treated as a comment and stripped out when loading the file into Ghostwriter.
/* This is a multi-
line comment */
Author and Title Lines
Note: setting the book author in Minecraft to something other than your own username seems to have been disabled. The author line has been left to preserve backwards-compatibility, but has no effect when signing a book.
The author and title lines are optional, but they must each be on their own line, and prefaced by author: and title: respectively
For example:
title:Kicking Over Sandcastles
author:HCF_Kids
The title and author keys can appear anywhere within the file, and are case insensitive. Whitespace on either side of the value (e.g. 'title: The day of the Triffids ') will be ignored (the title would be read as 'The day of the Triffids'). Only the first instance of each title and author will be accepted. Subsequent lines will be treated as part of the book.
Line Breaks, Page Breaks, and Whitespace
Line breaks are indicated by a pair of hashes (##) which can be repeated as many times as the user wants. The can be separated by a space but don't have to be. Any whitespace preceding a pair of hashes will be removed.
Example:
This will be ## rendered as ## three lines
Ordinary line breaks in the file (\n, \r\n) will be ignored.
Pagebreaks are denoted by four 'greater than' angled brackets (>>>>). Whitespace preceding a pagebreak will be removed.
Example:
This is one page>>>>This is a new page
The linebreak and pagebreak symbols can be escaped with a single backslash if they need to be used literally
Example:
This will be##two lines
This will \## be one
Blank lines will be removed.
Whitespace at the end of a page will be removed.
Example file
//This is a single line comment by waffle_stomper on 2014-05-28. It will not appear in the book
author:PETN //Comments can start at any point on a line
title:Truncating excessively long names
/* This is a multi-line comment
None of this will be included in the book
* /
This is the first page.##
This is going to be on a new line!
>>>>
This is the second page. The pagebreak character can go on the end of the line if you'd like.>>>>
This is the third page.
You
can
use
as
many
lines
as
you
like
but anything between pagebreaks will be considered as one page (unless it's too long to fit on a single page).
Also, don't forget to insert a space
if you're splitting a line //See the space there?
otherwise your words will be joined together.
>>>>
title: This is considered to be part of the text for the book.