descriptionAn html to pdf to paper publishing system developed for and by flossmanuals.net
homepage URLhttp://objavi.flossmanuals.net
ownerdouglas@paradise.net.nz
last changeSun, 18 Jul 2010 08:24:32 +0000 (18 20:24 +1200)
content tags
add:
README
Objavi2: another FLOSS Manuals publishing system
================================================

Introduction
============

FLOSS Manuals books are written and stored as HTML, but are usually
converted to PDF, epub, or ODF for distribution or printing.  Programs
which perform this task are called objavi (pronounced "ob-Yah-vee"),
after the Croatian word "objavi!" meaning "publish!".

The previous objavi, Objavi beta, could produce very good PDF
documents using Latin text, but did not cope well with other scripts,
and could not produce other output.  Objavi 2 was originally written
just to provide fully internationalised PDFs, but it has since been
adapted to produce other formats.

Objavi 2 is free software, distributed under the version 2 or greater
of the GNU General Public License.  The source can be viewed at

 http://booki-dev.flossmanuals.net/git?p=objavi2.git
 (or, alternatively, http://repo.or.cz/w/objavi2.git)

which also contains instructions for cloning the git repository.  If
you want a source tarball without worrying about git, try this link:

 http://repo.or.cz/w/objavi2.git?a=snapshot;h=HEAD;sf=tgz

It is primarily written in Python, with a substantial amount of
QSAScript (an ECMAscript variant) and some Javascript, HTML, and CSS.

The development of Objavi2 was supported by Internews.  It was
extended to produce epub documents with support from the Internet
Archive.


The objavi process
==================

Objavi2 starts with a "booki-zip", as defined in the file
"booki-zip-standard/txt".  This might be sourced from a Booki
instance, or from Twiki via the booki-twiki-gateway script, or perhaps
form an epub imported via Espri.

PDF Output
~~~~~~~~~~
If a PDF is required, the HTML is concatenated, various extra bits are
inserted, and the wkhtmltopdf program rederes it using WebKit.

At this point the PDF has no page numbers, no gutters, no table of
contents, and is using a too big paper size.  In order to write a
table of contents, an outline of the PDF is extracted and laid out as
html.  The table of contents thus generated is combined with other
preliminary pages and another PDF is created.

If a book PDF is required, Pdfedit is used to crop the pages down to
size and to shift them alternately left and right, creating a gutter
for the spine of the book.  Then pdfedit is used again to add page
numbers to both PDFs, with lowercase roman numbers being used for the
preliminary pages.

Finally the two PDFs are combined using pdftk and, optionally, spun
180 degrees so they appear upside down.  If a right-to-left book is
printed like this on a left-to-right printer, the binding will be on
the correct side.

Pdfedit and wkhtmltopdf both require an X server to run, for which
Xvfb is used.

For newspaper format, the page size is set to the column width, and
pdfnup is used to arrange the columns on another page.

OpenOffice output
~~~~~~~~~~~~~~~~~
ODF output was introduced with Objavi 2.1.  This uses an Open Office
instance controlled by pyuno.

Epub output
~~~~~~~~~~~
The html in the booki-zip is manipulated into xhtml using lxml, and
the structural information and metadata is converted into epub form.


Future plans
============

See http://booki-dev.flossmanuals.net/report

Installation
============

See the INSTALL file.  Apologies for its inadequacy.
shortlog
2010-07-18 Douglas Bagnall[Jan Gerber] fix unicode filenames in wikibooks2epub... master
2010-07-18 Douglas Bagnallrsync to test server with -v, do not copy booki
2010-07-18 Douglas Bagnallalias "source" to "server" in booki-twiki-gateway.cgi...
2010-07-10 Douglas Bagnalladd booki.halo.gen.nz to config. for now.
2010-07-10 Douglas Bagnalluse booki.cc, not booki.flossmanuals.net, as default...
2010-07-10 Douglas Bagnalldrop unused config variable
2010-07-10 Douglas Bagnalladd environment variable switch to show booki servers...
2010-07-10 Douglas Bagnallwhen START debug is on, show the query
2010-07-10 Douglas Bagnallshift toward booki styling
2010-07-08 Douglas Bagnallremove promise of ODT documents
2010-07-07 Douglas Bagnallwkhtmltopdf contents output format has changed (to...
2010-07-01 Douglas Bagnallprefixing a root path too many times doesn't work
2010-07-01 Douglas Bagnallopen office is broken and perhaps dangerous. just block...
2010-07-01 Douglas Bagnalltry_to_kill is useful in more places tha the function...
2010-07-01 Douglas Bagnallbook.toc_header should be left in utf-8, not decoded...
2010-07-01 Douglas Bagnallcatch broken pipe messages (i.e. browser navigated...
...
tags
14 years ago v2.1.1 Version 2.1 as it should have been...
14 years ago v2.1.0 Version 2.1 with newspaper and...
14 years ago v2.01 Stable version 2.0 (+ minor changes)
heads
13 years ago master
14 years ago future
14 years ago objavi2.1