Files and folders

Every book has the source folder. Sources are located in folders like workshop/source/mybook. If you use Bulldoc, through the web server, then sources should be available to it.

The source folder has the following structure:

/pages  -- Page's text and images
   introduction.html -- page
   /chapter1  -- chapter's folder
     topic1.html -- chapter's page

toc.yml  -- Table of Contents file
book_data.yml -- Book's data file: Name, author, year of publishing and so on.

To create new book run:

bulldoc -c mybook

This command will create 2 folders:

And two files:
empty /home/bulldoc/workshop/source/mybook/toc.yml
and /home/bulldoc/workshop/source/mybook/book_data.yml

Also to workshop/source/bookshelf.yml, the following line will be added:


You can edit workshop/source/mybook/book_data.yml, by pointing book's name or change other parameters.

Bookshelf setting

You should specify your book in bookshelf file for the program to find sources.

The settings file is located in workshop/source/bookshelf.yml

There are one book already. The one you read.

Books on the bookshelf are sources and export settings combined. Each book has an ID, called the keyword, which can contain alphanumeric characters. It is enough just to mention keyword of the book if you're using default settings:


But sometimes you need special settings. The full book's settings section looks like the following (attention! YML files uses spaces instead of tabs):

  title: BullDoc CHM
  rootIndexLevel: -1   #Show full TOC on the cover
  source: mybook_original
  dest:   mybook_special
  theme: blueprint_chm
  outputMode: html
  hideOnBookShelf: 0
  language: eng

mybook is the keyword. This keyword will be used in the URL to access the book. And the chm-compilation files will be named after it.

title sets Book's title, which will be displayed on the bookshelf. The value from the Book's data file will be used if this parameter is omitted. If this file doesn't exist still, then keyword will be used.

source — source folder. dest specifies the destination for static html files to be placed. The path could be either absolute or relative (standard path to workshop will be added in this case)

rootIndexLevel tunes table of contents depth. You can set another level for the chapters. If chapter hasn't depth's level rootIndexLevel will be used. The -1 value will remove limits and there should be entire tree displayed.

theme. There is already one theme in the package — blueprint. You can copy this theme with another name and make changes. Themes are stored in workshop/themes. The 'theme' parameter value defines theme's folder's name. See also Layout and style. If this parameter is not set the default theme will be used (blueprint).

hideOnBookShelf If set to true then this book will not appear on the bookshelf.

outputMode Output mode, – html, html_single and chm.

language sets interface language. If language of your book differs from one set in global settings, you should specify language. There are three language supported for now: russian-windows1251 (rus), russian-utf8 (utf8_rus) and English (eng).

It could happened that locale doesn't match with default one for selected language. You can set locale by locale parameter. See also Interface language.

Bookshelf's divisions

By the time the number of books will grow. You can use separators for grouping books. They looks like pseudo-records in bookshelf file:

  separatorTitle: Computer books


  separatorTitle: Fiction


© H-type, 2008