Download the PHP package kiwilan/php-opds without Composer

On this page you can find all versions of the php package kiwilan/php-opds. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-opds

PHP OPDS

Banner with woman with eReader picture in background and PHP OPDS title

php version downloads license tests codecov

PHP package to create OPDS feed (Open Publication Distribution System) for eBooks.

Version Supported Date Format Query param
1.2 November 11, 2018 XML ?v=1.2
2.0 Draft JSON ?v=2.0

All old versions: 0.9, 1.0 and 1.1 have a fallback to OPDS 1.2.

Requirements

About

OPDS is like RSS feeds but adapted for eBooks, it's a standard to share eBooks between libraries, bookstores, publishers, and readers. Developed by Hadrien Gardeur and Leonard Richardson.

This package has been created to be used with bookshelves-project/bookshelves, an open source eBook web app.

[!NOTE] The Open Publication Distribution System (OPDS) catalog format is a syndication format for electronic publications based on Atom and HTTP. OPDS catalogs enable the aggregation, distribution, discovery, and acquisition of electronic publications. OPDS catalogs use existing or emergent open standards and conventions, with a priority on simplicity.

The Open Publication Distribution System specification is prepared by an informal grouping of partners, combining Internet Archive, O'Reilly Media, Feedbooks, OLPC, and others.

From Wikipedia

Some resources about OPDS and eBooks:

Features

Roadmap

Installation

You can install the package via composer:

Usage

You have to use Opds::make() method to create an OPDS instance, the only param is config to set OPDS config, totally optional. Default response is XML with OPDS version 1.2, you can force JSON response with OpdsConfig::class method forceJson() to use only OPDS 2.0. With get() method, you can get full instance of Opds with OpdsEngine and OpdsResponse.

You have different informations into Opds::class.

Some informations about OPDS instance:

And about engine and response:

OPDS Version

You can use query parameter version to set it dynamically. You could change this query into OpdsConfig::class.

[!WARNING]

If you set v query parameter to 1.2 with OpdsConfig::class method forceJson(), query param will be ignored.

OPDS Engine

Engine will convert your feeds to OPDS, depending of OPDS version.

You can get engine used with getEngine() method from Opds::class. Property contents contains array of feeds, OpdsEngine allow conversion into XML or JSON with __toString() method, the output depends of OPDS version.

OPDS Response

To build OPDS feed, you have to get() method. It will return an instance of Opds with OpdsEngine, OpdsResponse and paginator filled.

To get response, you can use getResponse() method from Opds::class.

Send response

[!NOTE]

This method is totally optional, you can send response to browser by yourself.

You can send response to browser by yourself from OpdsResponse to get status code, headers and contents or use send() method available into Opds and OpdsResponse.

You can call get() method before send() method if you want to get OpdsResponse instance.

To get response

[!NOTE]

You can use exit parameter from send() method to stop script after sending response.

OPDS Config

OPDS config can be set with OpdsConfig::class:

[!NOTE]

You can override OpdsConfig with setter methods.

OPDS Pagination

You can use pagination from Opds with paginate() method, it will generate pagination based on maxItemsPerPage property from OpdsConfig::class.

You can use OpdsPaginate::class to handle manual pagination

OPDS entry

Navigation

You can create a navigation entry with OpdsEntryNavigation::class:

[!TIP]

You can override OpdsEntryNavigation with setter methods.

And you can add this entry to OPDS feed with feeds() method:

Book

You can create a book entry with OpdsEntryBook::class:

[!WARNING]

Some properties can be used only into OPDS 2.0, see OPDS 2.0 specification.

[!TIP]

You can override OpdsEntryBook with setter methods.

And you can add this entry to OPDS feed with feeds() method:

Search

This package do NOT implements any search engine, you can use your own search engine and use Opds::class to create OPDS feed.

Query parameters used for search are statically defined into specifications:

[!TIP]

I advice Meilisearch for search engine, it's a powerful and easy to use search engine.

Here an example:

More usages

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of php-opds with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spatie/array-to-xml Version ^3.2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kiwilan/php-opds contains the following files

Loading the files please wait ....