Kirby Paperback Export
What does this plugin do?
The plugin generates a lightly formatted plain text file from a set of pages specified by the user. The text file is used to create a “book” package which can be viewed on a Newton OS device.
An example of this file can be downloaded using the following link. The file contains all of the terms currently published on the Newton Glossary site.
What is a Paperback book, you ask?
Paperback is a simple cross-platform utility created by David Fedor that takes plain text files and quickly packages them for viewing on a Newton OS device. Since the Paperback utility only runs under classic Mac OS and Windows, an online Paperback Book Maker was developed by Victor Rehorst for all your cross-platform needs.
After installing the plugin using one of the methods listed below, visiting
yoursite.com/export/paperback should automatically download a text file without any additional configuration.
To install the plugin manually, download the files and put them in:
Installing the plugin using the Kirby command line interface:
$ kirby plugin:install splorp/kirby-paperback-export
Updating the plugin using the Kirby CLI:
$ kirby plugin:update splorp/kirby-paperback-export
Installing the plugin as a Git submodule:
$ cd your/project/root $ git submodule add https://github.com/splorp/kirby-paperback-export.git site/plugins/paperback-export $ git submodule update --init --recursive $ git commit -am "Add Kirby Paperback Export plugin"
Updating the plugin as a Git submodule:
$ cd your/project/root $ git submodule foreach git checkout master $ git submodule foreach git pull $ git commit -am "Update submodules" $ git submodule update --init --recursive
By default, Kirby Paperback Export will include the text from the title and description fields for every page on your Kirby site, including invisible pages. The following options allow you to select and filter which pages are included.
// Include invisible pages c::set('paperback.include.invisible', true); // Include only the children of a specific page c::set('paperback.include.children', ); // Exclude specific templates c::set('paperback.exclude.template', );
- Exported content is not timestamped or versioned
- Linebreaks surrounding headings are collapsed so text blocks are mashed together
- Output is currently optimized for the Newton Glossary instance of Kirby
- Refactored filtering options
- Fixed formatting of paragraph breaks in
- Initial release
Copyright © 2017 Grant Hutchinson
This project is licensed under the short and sweet MIT License. This license allows you to do anything pretty much anything you want with the contents of the repository, as long as you provide proper attribution and don’t hold anyone liable.
See the license.txt file included in this repository for further details.