Open main menu

Changes

2,384 bytes added ,  08:34, 26 April 2020
no edit summary
{{highlight|
text = The Collections extension has been in flux with the evolving situation with PDF handling in MediaWiki. The information here is retained for reference purposes. This notice will be removed and the information updated once a new Collection extension is available.
}}
 
 
[[File:mwlib.png|frame|A single article or collection of pages can be output in a variety of formats; on-demand]]
Books (Collections is the formal software name, Books is the more User-friendly feature name) allows you to export any content you want from the wiki into formats more suitable for offline reading, sharing, printing etc.
Books is a feature of this wiki, added by [[mw:Extension:Collection]] which in turn relies on a host of other goodies such as Python's [http://pypi.python.org/pypi/setuptools setuptools], [http://pythonware.com/products/pil/ Imaging Library]<ref>sudo yum install python-imaging or sudo apt-get install python-imaging should do the trick, but make sure you have a proper python</ref>, and a whole render server which is supplied by PediaPress. Because of the Python dependencies, you should make sure you have a proper Python, which at the time of this writing <ref>~~~~</ref> means 2.6 or 2.7 (maybe later a 3.x version?)
== Users ==
* http://code.pediapress.com/wiki/wiki/WikiToPDF
== Installation ==
To get the MediaWiki Document server going locally, follow the guide on pediapress.com
<source lang="bash">cdmkdir -p $HOME/lib/python2.7# edit .bashrc to alias python to python2.7 (already installed on system)MYENV=WIKIwget http://peak.telecommunity.com/dist/virtual-python.pypython virtual-python.py --no-site-packageswget http://peak.telecommunity.com/dist/ez_setup.pysudo python ez_setup.pysudo easy_install virtualenvvirtualenv --no-site-packages $MYENVcd $MYENVsource ~/WIKI/bin/activate./bin/pip install -i http://pypi.pediapress.com/simple/ mwlib./bin/pip install -i http://pypi.pediapress.com/simple/ mwlib.rlmw-zip -c :en -o test.zip Acdc Numbermw-render -c test.zip -o test.pdf -w rl# view error messages and view pdf file for resultswget http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpmsudo yum install libgcjsudo rpm -i pdftk-2.02-1.el6.x86_64.rpm# or do a user install of pdftkmkdir $HOME/srccd $HOME/srcwget http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-src.zipunzip pdftk-2.02-src.zipcd pdftk-2.02-dist/pdftkmake -f Makefile.Redhat > make.log 2>&1cp pdftk ~/bin/</source><pre>Successfully installed mwlib pyparsing timelib bottle pyPdf apipkg qserve lxml py sqlite3dbm simplejson roman gevent odfpy Pillow greenlet</pre>
{{Messagebox
| type = failure
# run this service automatically in run-levels 3 or 5
# see chkconfig for more detail
# on debian/ubuntu use sysv-rc-conf
# chkconfig: 35 90 10
# description: mediawiki-serve - does document conversion to PDF
--pid-file='/var/run/mw-serve.pid' \
--report-from-mail=greg@freephile.com \
--report-recipient=greg@freephile.com"www-data
;;
exit 0
</source>
 
 
=== Digital Ocean ===
*{{@todo}} Install, verify and document process of setting up local render server
I have not installed a local render server, but on 2016-01-09 I did update the Collection extension. The new setup renders through pediapress. When I get a chance, I'll take a look at the current development status of the [https://meta.wikimedia.org/wiki/Book_tool book tool] and related efforts like [[mw:Offline content generator|Offline content generator]]
 
{{References}}