mikespub / epub-loader
epub-loader is a utility resource for ebooks
Installs: 161
Dependents: 2
Suggesters: 3
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=8.2
- ext-dom: *
- ext-json: *
- ext-mbstring: *
- ext-xml: *
- ext-zip: *
- ext-zlib: *
- mikespub/php-epub-meta: ^3.3
- mikespub/survos-wikidata: ^5.2
- twig/twig: ^3.14
Requires (Dev)
- phpunit/phpunit: ^10.5||^11.4
Suggests
- mikespub/seblucas-cops: COPS - Calibre OPDS (and HTML) PHP Server
- dev-main
- 3.5.11
- 3.5.10
- 3.5.9
- 3.5.8
- 3.5.7
- 3.5.6
- 3.5.5
- 3.5.4
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.0
- 2.x-dev
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.x-dev
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
This package is auto-updated.
Last update: 2024-11-18 17:48:35 UTC
README
Prerequisites for this fork
- PHP 8.x with DOM, GD, Intl, Json, PDO SQLite, SQLite3, XML, Zip and ZLib support (PHP 8.2 or later recommended)
- Release 3.x.x will only work with PHP >= 8.2 - typical for most source code & docker image installs in 2024 and later
- Release 2.x.x will only work with PHP >= 8.1 - typical for most source code & docker image installs in 2023 and later
- Release 1.x.x still works with PHP 7.4 if necessary - earlier PHP 7.x (or 5.x) versions are not supported with this fork
Dependencies
- This package depends on mikespub/php-epub-meta (seblucas/php-epub-meta) to get metadata from EPub files
- It is a complementary app for mikespub/seblucas-cops = COPS - Calibre OPDS (and HTML) PHP Server
They have the same PHP version dependencies for 1.x, 2.x and 3.x releases
Description
EPub Loader is a utility package for ebooks. It can be used as a stand-alone project or included in your own PHP application.
It supports multiple databases defined by name, database path and epub path where its ebooks are located. You can create new Calibre-compatible databases with EPub Loader, or use existing Calibre databases from elsewhere.
Main features are:
- Import:
- create Calibre database with available ebooks
- import CSV/JSON records into new Calibre database
- load JSON files from Lookup cache into new Calibre database
- Export:
- export CSV/JSON records with available ebooks
- dump CSV/JSON records from Calibre database
- export metadata cache via callbacks to your own application
- Lookup:
- match ebooks and authors with WikiData
- match ebooks and authors with Google Books
- match ebooks and authors with OpenLibrary
- match ebooks and authors with GoodReads
- explore content of metadata cache
- Extra:
- check book links by identifier type
- get existing notes from Calibre notes.db
- update ebook metadata with mikespub/php-epub-meta
- run extra actions defined in your own application
Installation (stand-alone)
composer create-project mikespub/epub-loader
- If a first-time install, copy
app/config.php.example
toapp/config.php
- Edit config.php to match your config
- Open the app directory url: ./app/index.php
Installation (included)
composer require mikespub/epub-loader
- Run
composer install -o
to install all package dependencies and optimize autoloader if needed - You can use
Marsender\EPubLoader\RequestHandler
to handle the request like in ./app/index.php
use Marsender\EPubLoader\RequestHandler; // get the global config for epub-loader from somewhere // get the current action, dbNum and urlParams if any // you can define extra actions for your app - see example.php $handler = new RequestHandler($gConfig, ExtraActions::class, $cacheDir); $result = $handler->request($action, $dbNum, $urlParams); // handle the result yourself or let epub-loader generate the output $result['endpoint'] = 'index.php/loader'; $result['app_name'] = 'My EPub Loader'; echo $handler->output($result, $templateDir, $template);
Adding extra actions
- You can add extra actions on databases and/or epub files as shown in ./app/example.php
class ExtraActions extends ActionHandler { // ... public function more() { // do some more... return [ 'result' => 'This is more...', 'extra' => 'easy', ]; } }
License & Copyright
This package is available under the GNU General Public License v2 or later - see LICENSE
EPub Loader was first distributed as resource for COPS - Calibre OPDS (and HTML) PHP Server. This fork is now a separate package that can work alone or be integrated with other web applications.
Copyright (C) 2013-2021 Didier Corbière Copyright (C) 2023- mikespub