Offline content generator/Installation/en

The ocr-collection is a tool collection under construction providing offline content rendering. It can be used in conjunction with the the Collection-Extension to provide book-rendereing.

Installation
Usually public rendering servers may be used. Their address can be provided to the Collection-Extension, which will use that. But sometimes it is necessary to install the rendering stack on own machines. In this case all systems were running Debian 7 (Wheezy). The installation on Ubuntu might be similar or even easier.

Prerequisites
ocr-collection is developed in javascript running on an nodejs rendering server. For rendering the wiki-markup parsoid is used, while jobs are managed via redis. Creating the PDFs is done using Texlive.


 * Everyting for PDF-Rendering

Unfortunately the packat proviced by wheezy does not include npm therefore we have to compile node ourselfes.
 * nodejs

Here we can use Debian's package:
 * Redis server

Parsoid is developed by the Wikimedia Foundation and available via git:
 * Parsoid

There is also some configuration necessary. Therefore copy the provided example config and modify it:

The syntax of the configuration file is javascript. Wikis are defined as:

With this also multiple wikis can be defined.

OCG-Renderer
Also the OCG-Renderer is a development of the Wikimedia Foundation. Therefore the download is recommended via git:
 * Download

The configuration file is best placed under : Because this project is still under development, some configuration parameters may change very quick.
 * Configuration

Wiki
As a frontend the Collection extension is used
 * Configuration

Starting
Redis is already started, a restart is only necessary, when some configuration is changed. But parsoid and ocg-collection need to be started.

After starting  should output someting including those lines: Proto Recv-Q Send-Q Local Address          Foreign Address         State tcp       0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN tcp       0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN tcp       0      0 0.0.0.0:17080           0.0.0.0:*               LISTEN

Troubleshooting
When a rendering job wasn't successful and it is restarted, it will fail again because some temporary files are still there on the rendering server's filesystem. In this case, those files must be deleted from.