Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
schmir committed Jan 3, 2008
0 parents commit 55163dc
Show file tree
Hide file tree
Showing 34 changed files with 2,868 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax: glob

*.so
*.o
*.pyc
*~
ID
mwlib.egg-info
build
trunk
mwlib/rl/test
mwlib.rl.egg-info/
33 changes: 33 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include .hgignore
include MANIFEST.in
include README.html
include README.txt
include enwiki-conf.txt
include example-mwlib.config
include ez_setup.py
include mwlib/__init__.py
include mwlib/fonts/DejaVuSans-Bold.ttf
include mwlib/fonts/DejaVuSans-BoldOblique.ttf
include mwlib/fonts/DejaVuSans-Oblique.ttf
include mwlib/fonts/DejaVuSans.ttf
include mwlib/fonts/DejaVuSansMono-Bold.ttf
include mwlib/fonts/DejaVuSansMono-BoldOblique.ttf
include mwlib/fonts/DejaVuSansMono-Oblique.ttf
include mwlib/fonts/DejaVuSansMono.ttf
include mwlib/fonts/DejaVuSerif-Bold.ttf
include mwlib/fonts/DejaVuSerif-BoldItalic.ttf
include mwlib/fonts/DejaVuSerif-Italic.ttf
include mwlib/fonts/DejaVuSerif.ttf
include mwlib/fonts/__init__.py
include mwlib/rl/__init__.py
include mwlib/rl/apps.py
include mwlib/rl/create_collection.py
include mwlib/rl/customflowables.py
include mwlib/rl/debughelper.py
include mwlib/rl/gfdl.txt
include mwlib/rl/pagetemplates.py
include mwlib/rl/pdfstyles.py
include mwlib/rl/rltables.py
include mwlib/rl/rlwriter.py
include mwlib/rl/wikipedia_logo.png
include setup.py
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
all:: README.html MANIFEST.in

MANIFEST.in::
./make_manifest.py

README.html: README.txt
rst2html.py README.txt >README.html

develop:: all
python setup.py develop

sdist:: all
python setup.py build sdist

egg:: all
python setup.py bdist_egg

83 changes: 83 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. -*- mode: rst; coding: utf-8 -*-
======================================================================
mwlib.rl - reportlab pdf writer
======================================================================


Overview
======================================================================
mwlib.rl provides a library for writing pdf documents from mediawiki_
articles which were parsed by the mylib 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)

You will also need:

*reportlab*
the svn version is needed currently

svn co http://www.reportlab.co.uk/svn/public/reportlab/trunk
python setup.py install


*mwlib*
mwlib parses mediawiki articles



Contact/Further Information
======================================================================
For further information please visit our trac instance running at
http://code.pediapress.com
The current development version can also be found there.


License
======================================================================
Copyright (c) 2007, PediaPress GmbH

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of PediaPress GmbH nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

.. _mediawiki: http://www.mediawiki.org
9 changes: 9 additions & 0 deletions enwiki-conf.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[images]
type = download
url = http://upload.wikimedia.org/wikipedia/commons/
localpath = /home/ralf/enwiki/images

[wiki]
type = net
url = http://en.wikipedia.org/wiki/@TITLE@?action=raw

41 changes: 41 additions & 0 deletions example-mwlib.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[wiki]
# name of your wiki (e.g. "English Wikipedia" or "John Doe's Wiki")
name = Your Wiki

# URL of your wiki
url = http://localhost/wiki/
type = net

# URL to retrieve articles in wikitext
# @TITLE@ is replaced with the article title
# @REVISION@ is replaced with the article revision (oldid)
articleurl = http://localhost/wiki/index.php?title=@TITLE@&oldid=@REVISION@&action=raw

# URLs to retrieve templates in wikitext
# @TITLE@ is replaced with the article title
templateurls = http://localhost/wiki/index.php?title=Template:@TITLE@&action=raw


# URL to retrieve the template blacklist
# blacklisted templates are not included in the pdf
# Syntax for the blacklist:
# * [[Template:TEMPLATENAME]]
# --> each line contains one blacklisted template
# the line has to start with an asterisk followed by a link to the template
templateblacklist = http://localhost/wiki/index.php?title=Templateblacklist&action=raw

[images]
type = download

# URL to your images directory
url = http://localhost/wiki/images/

# Path to local caching directory for images.
# If no localpath is given a temporary directory is chosen
# and images are not cached in that case
localpath = /tmp/images/

[pdf]

# path to the png used on the cover page of generated PDFs
coverimage = /path/to/mwlib.rl/mwlib/rl/wikipedia_logo.png
Loading

0 comments on commit 55163dc

Please sign in to comment.