mwlib.rl provides a library for writing pdf documents from mediawiki articles which were parsed by the mwlib library.
Installation
You need to have setuptools/easy_install installed. Installation should be as easy as typing:
easy_install mwlib.rl
If you don't have setuptools installed, download the source package, unpack it and run:
python setup.py install
(this will also install setuptools)
texvc
You have to make sure that texvc is in your system PATH. texvc is supplied by the mediawiki installation. It should be located in the following directory: mediawiki_install_path/math
texvc also requires: * LaTeX * dvipng * AMS* packages for LaTeX (maybe included in LaTex distribution)
You will also need:
mwlib
mwlib parses mediawiki articles
pygments
for source code formatting http://pygments.org/ (debian packet: python-pygments)
fribidi
package for handling bidirectional (right-to-left / left-to-right) text. gnu freebidi and the python bindings are needed http://fribidi.freedesktop.org/wiki/ (debian packages: libfribidi0 and libfribidi-dev) http://pyfribidi.sourceforge.net/index.html (debian packages: python-pyfribidi)
ploticus
package which is used to render timelines http://ploticus.sourceforge.net/doc/welcome.html (debian package: ploticus)
gettext
package which is used for translations of build-in strings http://www.gnu.org/software/gettext/ (debian package: gettext)
pdftk
this is optional and used for generating the Table of Contents. http://www.accesspdf.com/pdftk/ (debian package: pdftk)
PDF Customization
Customizing the resulting PDFs is possible by adding a custom configuration file. The file needs to named customconfig.py and should reside next to the pdfstyles.py file. Basically you can override anything in the pdfstyles.py file with your custom configuration. Any changes need to be done with care in order not to break things! Check the pdfstyles.py file for more information.
Also check the customnodetransformer.py file for more options for customization.
Font configuration:
The font configuration can be changed in fontconfig.py. For the default configuration to work properly it is necessary to install a couple of fonts. If these fonts are not installed built-in Adobe fonts are used where necessary.
The following fonts need to be installed: AR PL UMing HK, Ezra SIL, Nazli, UnBatang, Arundina Serif, Lohit Telugu, Sarai, Lohit Punjabi, Lohit Oriya, AnjaliOldLipi, Kedage, LikhanNormal, Lohit Tamil, Linux Libertine
These fonts are contained in the following debian (meta-)packages: ttf-indic-fonts, ttf-unfonts, ttf-farsiweb, ttf-arphic-uming, ttf-sil-ezra, ttf-thai-arundina, linux-libertine
After the font installation a directory "mwlibfonts" needs to be created in the home directory. All fonts need to be symlinked to the appropriate directories (see fontconfig.py).
Product's homepage
Requirements:
· Python
What's New in This Release: [ read full changelog ]
· require more recent version of mwlib, pygments and mwlib.ext
· do not expand templates in renderArticleTitle
· Localisation updates from http://translatewiki.net.