{"id":17855822,"url":"https://github.com/splorp/kirby-paperback-export","last_synced_at":"2025-08-31T19:42:44.148Z","repository":{"id":50535076,"uuid":"108600071","full_name":"splorp/kirby-paperback-export","owner":"splorp","description":"Export Kirby CMS content for use with the PaperBack Book Maker","archived":false,"fork":false,"pushed_at":"2024-04-17T17:48:55.000Z","size":961,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T17:05:43.029Z","etag":null,"topics":["kirby-cms","kirby-plugin","kirby3","kirby3-plugin","kirby4","kirby4-plugin","newton-book","newton-os","paperback-book-maker"],"latest_commit_sha":null,"homepage":"https://ritsuko.chuma.org/paperback/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/splorp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-27T22:06:27.000Z","updated_at":"2024-08-22T03:03:11.000Z","dependencies_parsed_at":"2024-04-17T18:54:30.540Z","dependency_job_id":"5127f987-d9ea-48b4-b3bb-2450ff9aa69c","html_url":"https://github.com/splorp/kirby-paperback-export","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fkirby-paperback-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fkirby-paperback-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fkirby-paperback-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splorp%2Fkirby-paperback-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splorp","download_url":"https://codeload.github.com/splorp/kirby-paperback-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244630024,"owners_count":20484301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kirby-cms","kirby-plugin","kirby3","kirby3-plugin","kirby4","kirby4-plugin","newton-book","newton-os","paperback-book-maker"],"created_at":"2024-10-28T02:42:03.532Z","updated_at":"2025-08-31T19:42:44.136Z","avatar_url":"https://github.com/splorp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kirby Paperback Export\n\nExport [Kirby](https://getkirby.com/) CMS content for use with the [Paperback Book Maker](https://ritsuko.chuma.org/paperback/).\n\nThis plugin is compatible with Kirby 3, Kirby 4, and Kirby 5.\n\nFor [Kirby 2](https://github.com/getkirby-v2) sites, download version [1.0.1](https://github.com/splorp/kirby-paperback-export/releases/tag/1.0.1) of the plugin.\n\n## What does this plugin do?\n\nThe 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.\n\nAn example of the exported file can be downloaded using the link below. The file contains all of the terms currently published on the [Newton Glossary](https://newtonglossary.com/) site.\n\n[newtonglossary.com/export/paperback](https://newtonglossary.com/export/paperback)\n\n## What is a Paperback book, you ask?\n\nPaperback is a simple cross-platform utility created by [David Fedor](https://web.archive.org/web/20171018055006/https://thefedors.com/pobox/) 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](https://ritsuko.chuma.org/paperback/) was developed by [Victor Rehorst](https://github.com/chuma) for all your cross-platform needs.\n\n## Installation\n\nAfter installing the plugin using one of the methods below, visiting `yoursite.com/export/paperback` should automatically download a text file without any additional configuration.\n\n### Download\n\nTo install the plugin manually, [download the current release](https://github.com/splorp/kirby-paperback-export/releases), decompress the archive, and put the files in:\n\n`site/plugins/paperback-export`\n\nFor [Kirby 2](https://github.com/getkirby-v2) sites, download version [1.0.1](https://github.com/splorp/kirby-paperback-export/releases/tag/1.0.1) of the plugin.\n\n### Git Submodule\n\nInstalling the plugin as a Git submodule:\n\n    $ cd your/project/root\n    $ git submodule add https://github.com/splorp/kirby-paperback-export.git site/plugins/paperback-export\n    $ git submodule update --init --recursive\n    $ git commit -am \"Add Kirby Paperback Export plugin\"\n\nUpdating the plugin as a Git submodule:\n\n    $ cd your/project/root\n    $ git submodule foreach git checkout master\n    $ git submodule foreach git pull\n    $ git commit -am \"Update submodules\"\n    $ git submodule update --init --recursive\n    \n## Options\n\n### Table of Contents Prefix\n\nPaperback books can include a table of contents created from the text found located in the `$page-\u003etitle()` field. The following option can be added to the `site/config/config.php` file, allowing you to specify a custom table of contents prefix.\n\nThis option is not set by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.prefix' =\u003e '',\n];\n```\n\nSpecify a table of contents prefix.\n\n```php\nreturn [\n\t'splorp.paperback-export.prefix' =\u003e '@@TOC ',\n];\n```\n\n### Include Other Content Fields\n\nBy default, text located in the `$page-\u003etitle()` and `$page-\u003etext()` fields will be included in the exported data. The following option can be added to the `site/config/config.php` file, allowing you to specify other content fields to be included. These fields will be appended after the title and text fields.\n\nThis option is not set by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.fields' =\u003e [],\n];\n```\n\nSpecify one or more content fields and their type as an array.\n\n```php\nreturn [\n\t'splorp.paperback-export.fields' =\u003e ['author' =\u003e 'text','posts' =\u003e 'related'],\n];\n```\n\nUse the `text` content type for any field containing alphanumberic data, such as an author name or date.\n\nUse the `related` content type for fields formatted using the YAML syntax for [related articles](https://getkirby.com/docs/cookbook/content/related-articles). The title field of each related article or page will be included in the exported data.\n\n### Include Unlisted Pages\n\nBy default, every page on your Kirby site will be included in the exported data. The following options can be added to the `site/config/config.php` file, allowing you to filter which pages are included based on certain criteria.\n\nThis option is set to true by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.includeUnlisted' =\u003e true,\n];\n```\n\n### Include Children Pages\n\nPages specified in this option will not be included, but the children of those pages will be included in the exported data.\n\nThis option is not set by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.includeChildren' =\u003e [],\n];\n```\n\nSpecify one or more pages as an array.\n\n```php\nreturn [\n\t'splorp.paperback-export.includeChildren' =\u003e ['blog','newsletter'],\n];\n```\n\n### Exclude Templates\n\nPages using the templates specified in this option will be excluded from the exported data.\n\nThis option is not set by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.excludeTemplate' =\u003e [],\n];\n```\n\nSpecify one or more templates as an array.\n\n```php\nreturn [\n\t'splorp.paperback-export.excludeTemplate' =\u003e ['about','search'],\n];\n```\n\n### Include Datestamp\n\nThe following option can be added to the `site/config/config.php` file, allowing you to add a datestamp that indicates when the data was exported. The datestamp is formatted as YYYY-MMM-DD and is inserted after the site title and description.\n\nThis option is set to false by default.\n\n```php\nreturn [\n\t'splorp.paperback-export.includeDatestamp' =\u003e false,\n];\n```\n\n## Release Notes\n\n### 2.0.7\n+ Changed `version` field to avoid conflict with Kirby 5 reserved field names\n\n### 2.0.6\n+ Improved handling of pages containing `\u003cimg\u003e` elements\n\n### 2.0.5\n+ Added option to specify inclusion of the datestamp\n\n### 2.0.4\n+ Added option to specify other content fields\n\n### 2.0.3\n+ Added option to specify the table of contents prefix\n+ Added better exception checking for option values\n+ Fixed malformed `support` field in `composer.json`\n+ Removed extraneous comments from `index.php`\n\n### 2.0.2\n+ Added `keywords`, `homepage`, `support.docs`, `support.source` fields to `composer.json`\n\n### 2.0.1.1\n+ Fixed version number in `index.php`\n\n### 2.0.1\n+ Refactored replacement patterns in string functions\n+ Removed extra line breaks introduced by heading elements\n+ Better handling of pages containing `\u003cimg\u003e` elements\n+ Added the current date to the exported file\n\n### 2.0.0\n+ Refactored and updated for Kirby 3\n+ Tweaked the option names to be more consistent and self explanatory\n+ Moved the file export code into `snippets/export.php`\n+ Renamed `snippets/page.php` to `snippets/content.php`\n\n### 1.0.1\n+ Refactored filtering options\n+ Fixed formatting of paragraph breaks in `$page-\u003etext()`\n\n### 1.0.0\n+ Initial release\n\n## Acknowledgements\n\nA tip of the hat to [Pedro Borges](https://pedroborg.es/) and his [Kirby XML Sitemap](https://github.com/pedroborges/kirby-xml-sitemap) for providing the necessary framework and inspiration to attempt my own plugin.\n\n## License\n\nCopyright © 2017–2025 Grant Hutchinson\n\nThis project is licensed under the short and sweet [MIT License](https://opensource.org/licenses/MIT). 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.\n\nSee the [license.txt](https://raw.github.com/splorp/kirby-paperback-export/master/license.txt) file included in this repository for further details.\n\n## Questions?\n\nContact me via [email](mailto:grant@splorp.com) or [Twitter](https://twitter.com/splorp).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplorp%2Fkirby-paperback-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplorp%2Fkirby-paperback-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplorp%2Fkirby-paperback-export/lists"}