logo

Personal tools
Vasudeva Projects vsPloneLibrary
Document Actions

The Architecture of vsPloneLibrary

The new library is based upon the following architecture:

vsLibraryBook

The top-level archetype that represents a book. Attributes include:

  • id, autogenerated
  • original title
  • description
  • author
  • original (boolean, indicates the original publication language)
  • ISBN
  • primary translator
  • year of first publication
  • publisher
  • genre: one of Talks, Story, Play, Poem, Prayer, Questions & Answers,Joke,Exercise,Song
  • private: a flag indicating non-public content
  • cover art
  • related items: standard Plone references

Each vsLibraryBook can contain one or more vsLibrarySection or vsLibraryContent objects.

vsLibrarySection

vsLibrarySection objects serves primarily to represent book structure and have following attributes

  • id, autogenerated
  • title
  • description
  • genre
  • private
  • related items

vsLibraryContent

A vsLibraryContent contains a logical unit of book text, for instance a chapter or a page. Attributes:

  • id, autogenerated
  • title
  • description
  • genre
  • private
  • contents: original text
  • related items

Format

vsLibraryContent objects store the original text in reST format in its content attribute. Custom reST directives can be used to enforce formatting of consequent paragraphs using directive name as the css style in resulting html.

At the moment these directives are implemented as css styles:

  • poem
  • answer
  • question
  • quote
  • note
  • interviewOther
  • interviewCKG

In addition, hidden directive can be used to mark paragraphs that are stored but should not be visible to public.

Examples of new directives:

.. hidden::
.. poem::

Ingestion

To make entering and editing book data easier, all the text can be written beforehand in a single reStructured text file and then imported into vsPloneLibrary site using vsPloneLibrary tool, that can be find in preferences.

The book structure can be described in the file using reST section headers as follows:

Book title
==========

Section title
-------------

Content title
~~~~~~~~~~~~~

Both vsLibrarySection and vsLibraryContent are represented by reST section. However vsLibraryContent is recognized as a leaf reST section, while vsLibrarySection is created from reST sections that contain another sections. Moreover, vsLibraryBook, vsLibrarySection or vsLibraryContent attributes (other than id and title) can be written just under the particular title using reST field-lists markup. For example:

Book title
==========
:description: This book ...
:genre: Talks
:author: ...

Browsing

All the objects and text marked private or hidden should not be visible by anonymous users.

TOC generation

TOC of a book is generated automatically.

Indexing

Hidden objects and text has to be omitted from the searches.

page created by viliam last modified 2006-11-27 03:57