Jump to content

Extension:SimpleBook

From mediawiki.org
MediaWiki extensions manual
SimpleBook
Release status: beta
Implementation User interface
Description Generate book-style PDFs from collections of Wiki pages
Author(s) OpenTechStrategies
Latest version 0.6.1 (9 April 2024)
MediaWiki > 1.41.0
PHP > 7.3
Database changes No
License GNU Affero General Public License 3.0 or later
Download SimpleBook-0.6.1.tar.gz
README.md

SimpleBook is a MediaWiki extension for rendering a collection of wiki pages as a book -- a PDF document with a table of contents.

User interface: Any user can start the book creation process from any wiki page by going to the Tools menu: "Tools" -> "Book Creation" -> "Start creating a book".

After that, every page gets a "Book creator" banner box at the top. That box contains one link to add/remove the current page to/from the book in progress, and another link to show and optionally finalize the entire book. When you are done selecting pages and are ready to generate the PDF, you can choose from a menu of paper sizes (A4, A5, A6, US Letter, and Legal); the material will be formatted and flowed automatically to fit the chosen size.

Technology: SimpleBook works by running a server that uses Puppeteer and Chromium to render pages and assemble them into books. Specifically: SimpleBook includes a Python Flask webserver that invokes a NodeJS application to perform the PDF rendering; these are called from the extension code.

History: SimpleBook is developed by Open Tech Strategies, LLC, as part of the larger Torque Sites project for Lever for Change. SimpleBook is a simplified fork of the Collection extension from PediaPress GmbH. (Collection had many features that weren't necessary for Torque Sites, and for the enhancements that we needed to make, we found that it would be easiest to first pare down Collection and then add features to the core that remained.)

Development: The development site for SimpleBook is code.librehq.com/ots/mediawiki/SimpleBook.

Samples:

Here are some sample books created from cloned Wikipedia pages:

Installation

[edit]

See the installation instructions.