Mediawiki collection extension installation: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 30: Line 30:
* http://groups.google.com/group/mwlib/topics (Google forums)
* http://groups.google.com/group/mwlib/topics (Google forums)


== Installation notes ==
Installing the whole suite requires some installation skills, but should go fairly smoothly on any Unix system and should be easy on a Debian-based Linux.
Installing the whole suite requires some installation skills, but should go fairly smoothly on any Unix system and should be easy on a Debian-based Linux.


=== Collection extension installation ===
== Collection extension installation ==


The collection extension installs like any other Mediawiki extensions. Really easy with Mediawiki=> 1.14 (Spring 2009).
The collection extension installs like any other Mediawiki extensions. Really easy with Mediawiki=> 1.14 (Spring 2009).


* You then can just leave all the defaults and the PDF will be generated by PediaPress.
* You then can just leave all the defaults and the PDF will be generated by PediaPress. However, '''if you have a slow server like this one''', you also should install a local render server (read the whole rest of this page, the pediapress server will likely loose pages due to server overload ....)


I suggest changing file Collection.i18n.php and change the string.
I suggest changing file Collection.i18n.php and change the string.
Line 49: Line 48:
</source>
</source>


=== mwlib installation ===
== mwlib installation ==
(not needed if you have a fast server and want to use the pediapress server)
Not needed if you have a fast server and want to use the pediapress server. Installation notes made for Solaris.


Made for Solaris
=== Prerequisites ===
 
; Prerequisites


Install these if don't have them (usually you do)
Install these if don't have them (usually you do)
Line 93: Line 90:
  pkgadd -d ocaml-3.10.2-sol10-sparc-local
  pkgadd -d ocaml-3.10.2-sol10-sparc-local


; Mwlib (installed with the tar ball, alternatively install mercurial)
=== Mwlib ===
 
Mwlib can be installed from a tar ball, alternatively through mercurial with easy_install.
 
I had to install manually, since I wanted to make some light patches to the code.
 
* Get if from http://code.pediapress.com/hg/mwlib/ (click on gz)
* Get if from http://code.pediapress.com/hg/mwlib/ (click on gz)
* Change the options in mwlib/options.py (e.g. reduce threads) if you like.
* Dezip gtar zxf mwlib-db30ecca003a.tar.gz (or whatever file name)
* Dezip gtar zxf mwlib-db30ecca003a.tar.gz (or whatever file name)
; Slowing down the page pulling
Problem: One ought to able to slow down the server. mw-render has an option for reducing threads. But no parameter can be set in the mw extension or the mwserver itself. Therefore, one has to build mwlib from source.
Changes made:
mwlib/options.py
In about line 60, change the default, e.g. from 10 to 3 if your server can't cope.
; Not suported (unimportant) tags:
* Added in mwlib/tagtext.py around line 100 a tag to exclude:
'pageby'
Then go:
   python setup.py install
   python setup.py install


Alternative:
Alternative if you don't plan any changes
  easy_install mwlib && rehash
  easy_install mwlib && rehash
=== Other libraries needed by mwlib ===


; pygments
; pygments
Line 138: Line 155:
* Add the directory to the system path
* Add the directory to the system path


; Configuration
=== Testing ===
 
(to do)
 
; Testing
* mw-render --config=http://edutechwiki.unige.ch/mediawiki/ --writer=odf --output=./edutech.odt Educational_technology
* mw-render --config=http://edutechwiki.unige.ch/mediawiki/ --writer=odf --output=./edutech.odt Educational_technology
** OK - [[User:Daniel K. Schneider|Daniel K. Schneider]] 16:23, 4 May 2009 (UTC) (using version mwlib-41c207e76b28/)
** OK - [[User:Daniel K. Schneider|Daniel K. Schneider]] 16:23, 4 May 2009 (UTC) (using version mwlib-41c207e76b28/)
Line 152: Line 165:
** OK
** OK


=== mw-serv ===
== mw-serv ==


MW Serv provides a server interface for the mw-render engine and mw-zip.
MW Serv provides a server interface for the mw-render engine and mw-zip.
Line 161: Line 174:
  mw-serve --cache-dir=/data/mwcache/mwlibcache/ &
  mw-serve --cache-dir=/data/mwcache/mwlibcache/ &


; Tweaking the collection extension
=== Tweaking the collection extension ===
* http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Collection/README.txt
* http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Collection/README.txt


Line 177: Line 190:
  $wgLicenseURL = "http://edutechwiki.unige.ch/fr/EduTech_Wiki:Copyrights";
  $wgLicenseURL = "http://edutechwiki.unige.ch/fr/EduTech_Wiki:Copyrights";
  $wgCollectionMaxArticles = 100;
  $wgCollectionMaxArticles = 100;
; Slowing down the page pulling
Problem: One ought to able to slow down the server. mw-render has an option for reducing threads. But no parameter can be set in the mw extension or the mwserver itself. Therefore, one has to build mwlib from source and change this:
mwlib/options.py
In about line 60, change the default, e.g. from 10 to 3 if your server can't cope.


[[Category: Installation tips]]
[[Category: Installation tips]]

Revision as of 20:22, 4 May 2009

Definition

The Mediawiki [collection] extension allows a user to organize personal selections of pages in a collection. Collections can be

This page includes some centralized help links and installation tips made for our own use - Daniel K. Schneider 16:31, 4 May 2009 (UTC).

See also:

Help pages

Bugs and feature requests:

Information about the collection extension and related server-side software

Installing the whole suite requires some installation skills, but should go fairly smoothly on any Unix system and should be easy on a Debian-based Linux.

Collection extension installation

The collection extension installs like any other Mediawiki extensions. Really easy with Mediawiki=> 1.14 (Spring 2009).

  • You then can just leave all the defaults and the PDF will be generated by PediaPress. However, if you have a slow server like this one, you also should install a local render server (read the whole rest of this page, the pediapress server will likely loose pages due to server overload ....)

I suggest changing file Collection.i18n.php and change the string.

'coll-rendering_text' => "<p><strong>Please wait while the document is being generated.
Depending on the size of book you may have to wait 5, 10, 15 minutes or longer.
</strong></p> 
 ......"

'coll-save_collection_text'       => 'Choose a storage location for your book and enter a name:',

mwlib installation

Not needed if you have a fast server and want to use the pediapress server. Installation notes made for Solaris.

Prerequisites

Install these if don't have them (usually you do)

  • Python => 2.5
  • Perl => 5
  • g++
  • Latex

Install Blahtexml

  • (not done so far)

Install setuptools-0.6c9-py2.5.egg

sh setuptools-0.6c9-py2.5.egg

Install python imaging library (PIL)

 python setup.py install

Install odfpy 0.7.0 (not 0.8.0)

python setup.py build
python setup.py install

Install rec2c

pkgadd -d re2c-0.13.5-sol10-sparc-local 

Install ocaml

pkgadd -d ocaml-3.10.2-sol10-sparc-local

Mwlib

Mwlib can be installed from a tar ball, alternatively through mercurial with easy_install.

I had to install manually, since I wanted to make some light patches to the code.

Slowing down the page pulling

Problem: One ought to able to slow down the server. mw-render has an option for reducing threads. But no parameter can be set in the mw extension or the mwserver itself. Therefore, one has to build mwlib from source. Changes made:

mwlib/options.py

In about line 60, change the default, e.g. from 10 to 3 if your server can't cope.

Not suported (unimportant) tags
  • Added in mwlib/tagtext.py around line 100 a tag to exclude:
'pageby'

Then go:

 python setup.py install

Alternative if you don't plan any changes

easy_install mwlib && rehash

Other libraries needed by mwlib

pygments
easy_install Pygments
Fribidi - both a library and the Python bindings
./configure --prefix=/usr/local
make
make install

(this is difficult to install)

 setenv fribidi_CFLAGS "-L/usr/local/lib -I/usr/local/include"
 setenv fribidi_LIBS -lfribidi
./configure
make
make install
Ploticus

(not installed)

mwlib.rl
easy_install mwlib.rl

Alternatively from a tarball:

texvc
  • Is in your mediawiki installation
  • Compile with gmake it if not already done (needs ocaml, see above)
cd /XXX/mediawiki/math
gmake
./texvc_test
  • Add the directory to the system path

Testing

mw-render --config=http://edutechwiki.unige.ch/mediawiki/ --writer=rl --output=./flash-cs3.pdf Flash_CS3_desktop_tutorial

mw-serv

MW Serv provides a server interface for the mw-render engine and mw-zip.

Run the server
mw-serve --cache-dir=/data/mwcache/mwlibcache/ &

Tweaking the collection extension

Add in Localsettings.php (if not already done) the rendering engines you will support. Typing mw-render --list-writers will list the ones you installed. E.g.

$wgCollectionFormats = array(
          'rl' => 'PDF',
          'odf' => 'ODT',
      );

Add in Localsettings.php if not already done the name and port of the server (altenatively you also could install a cgi script).

$wgCollectionMWServeURL = "http://xxx.yyy:8899";

Extra stuff:

$wgLicenseURL = "http://edutechwiki.unige.ch/fr/EduTech_Wiki:Copyrights";
$wgCollectionMaxArticles = 100;