plugins/roboBook.php

Not much documentation yet. roboBook is a plugin/layout combination that looks and acts like an online book, complete with Next Page, Prev Page and Last Read buttons, and a collapseable table of contents. The Next and Prev butons save page state (js cookie). The TOC does not save state. You can jump around the book randomly using the TOC and then return to the Last Read page with a button click--where the Last Read page was stored as a cookie by the user's last use of the Next Page or Prev Page buttons..

Pages

Book pages are *.htm files. Cameras.htm would might be the name of a page.
index.htm might be the first page in a chapter but its position in the Next Page button sequence is determined by its position in the p2n file rather than its name. The layouts/roboBook.xml layout definition leverages both plugins/bookNav.php and plugins/nextPrevButtons.php.

TOC (table of contents)

layouts/roboBook.xml defines the layout for a roboBook, which uses three plugins to make its contents: flexyFileContent, bookNav.php and nextPrevButtons.php. The TOC contains Next and Prev buttons but it is mainly generated by plugins/bookNav.php. bookNav.php reads the p2n file and generates teh navigation links. Every TOC contains a global section that never changes consisting of the files (typically preface.htm and introduction.htm) in the book's root directory (which can be anywhere on the server), and the books' chapters, if they exist, which are the first child subdirectories of the book root.

In addition to the global, always present Chapter links the TOC often displays local links, underneath the global chapters, which are the pages (*.htm file) contained within each chapter directory.

Chapters are Optional

A book might be no more than a series of *.htm files in a directory. But a book can have chapters. Chapters are any first child subdirectories of the book's root directory. Every book must have a p2n file (below). That p2n file resides in the root directory of the book. Chapters can have further sub-directories which might be useful for the developer's organizational needs. Chapter sub-directories have no meaning to the book itself. Conceptually a book is either a sequence of pages or a sequence of chapters, where each chapter has a sequence of pages. Chapter subDirectories do need further support in the TOC.

Page Resources (images etc)

The book root directory and each chapter typically have a roboresources directory which may or may not contain a pics subdirectory.
roboresources
roboresources/pics (images, like boat.jpg)
roboresources/slideshow (images or symlinks to images)
roboresources/thumbs (matching thumbnails, like tn-boat.jpg)

The p2n File

A p2n file is a sequence of sub-paths corresponding to the system's $_GET['robobpage'] arguments, which are sub-paths to pages. A p2n file can be generated with the recursive commandLineUtils/tocit.py script. after generting the p2n file will need hand editing.

preface.htm
introduction.htm
Cameras.htm
Chapter1
Chapter1/index.htm
Chapter1/whatever.htm
Chapter2
Chapter2/index.htm
Chapter3/whatever.htm

tocit.py

Page sequencing necessary for the Next and Prev page buttons depends on a p2n file in the book root.
You can generate such a file as follows:
copy commandLineUtils/tocit.py to your ~/bin directory
cd fragments/Library/Flies
run tocit.py <enter>
tocit.py writes to np2n, which can be edited. Then copy np2n to p2n when ready. The tocit.py script needs considerable work. It is a useful starting point. if the pages do not appear as expected inspect the p2n file
Each line should be the same as the $_GET parameter of ?robopage=Library/Flies/Dryflies/index.htm

If the p2n file does not appear as needed you might try running tocit.py with a --prepath argument
Or edit p2n manually with vi