mwlib.rl provides a library for writing pdf documents from mediawiki articles which were parsed by the mwlib library.
You need to have setuptools/easy_install installed. Installation should be as easy as typing:
If you don't have setuptools installed, download the source package, unpack it and run:
python setup.py install
(this will also install setuptools)
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 parses mediawiki articles
for source code formatting http://pygments.org/ (debian packet: python-pygments)
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)
package which is used to render timelines http://ploticus.sourceforge.net/doc/welcome.html (debian package: ploticus)
package which is used for translations of build-in strings http://www.gnu.org/software/gettext/ (debian package: gettext)
this is optional and used for generating the Table of Contents. http://www.accesspdf.com/pdftk/ (debian package: pdftk)
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.
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).
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.