Extension:PDF Writer
|
PDF Writer Release status: beta |
|
|---|---|
| Implementation | Data extraction |
| Description | Generates PDF from single articles or collections |
| Author(s) | PediaPress |
| License | GPL |
| Download | http://linux.softpedia.com/get/Programming/Libraries/mwlib-43845.shtml |
| Example | http://wiki.services.openoffice.org/wiki/Help:Collections |
|
Check usage (experimental) |
|
Contents |
[edit] Overview
mwlib.rl is a python library for writing pdf documents from MediaWiki articles which were parsed by the mwlib library.
See this press release Wikis Go Printable for more information on this project.
[edit] No Installation required !
The PDF Writer can run standalone on a server and provide PDF generation for multiple MediaWiki instances. A server for public testing and low traffic Wikis runs at http://tools.pediapress.com .
All you need is the Collection extension which is configured to use this server by default.
[edit] Example
[edit] Technical
The PDF Writer uses the Python Reportlab libraries to generate PDF based on a DOM derived from parsing mediawiki-markup using the mwlib parser. The Collection Extension can be used to select and manage articles that shall constitute the resulting PDF.
[edit] Source
mwlib.rl is copyrighted by PediaPress and is distributed under a BSD license (see the included README.txt for details).
[edit] Install
[edit] Using easy_install
Make sure, you have the needed environment. On Debian systems:
apt-get install g++ perl python python-dev python-setuptools python-imaging python-lxml libevent-dev
Simply download and install mwlib with easy_install:
easy_install mwlib && rehash
[edit] RPM
RPM based Distros that have yum - just do : yum search mwlib , then do : yum install mwlib
fyi: mwlib has some depedencies which makes it more hard to compile from scratch.
[edit] Mailing List
We have set up a google group for discussion of mwlib.rl. You can subscribe to it via email: mailto:mwlib-subscribe@googlegroups.com.
[edit] Help Needed
Please help us translate some strings used in the generated PDF. The process of internationalisation is done at translatewiki.net. We appreciate your help there.
[edit] Programs
mwlib installs the following programs:
- mw-render
- generates documents in formats like PDF or ODF from MediaWiki articles
- mw-zip
- generates ZIP files from MediaWiki articles that contain all information to produce some output document like a PDF file
- mw-serve
- starts a render server that allows the Collection extension to render documents from article collections
[edit] Configuration
If your MediaWiki has the MediaWiki API enabled, you just specify the base URL of the wiki as the configuration. For example using the English Wikipedia, this
$ mw-render --config http://en.wikipedia.org/w/ --username='xxxx' --password='yyyy' --output test.pdf --writer rl Physics
will produce a PDF document containing the article Physics.
[edit] Customization
It is possible to customize the resulting PDFs - for more information check the README.rst
[edit] Other Approaches
[edit] See also
- [1] mw-render Server Examples