User support issues remain available at https://github.com/seblucas/cops/issues - please use it if you need help with COPS in general. For the 2.x and 3.x versions please report any new issues at https://github.com/mikespub-org/seblucas-cops/issues
Pull requests should be against the latest source code at https://github.com/mikespub-org/seblucas-cops/pulls - thanks for any contributions :-)
See CHANGELOG for changes compared to upstream repository https://github.com/seblucas/cops from @seblucas
Same options as original:
Release package
Note: the release packages cops-3.x.x-php8x.zip
include the vendor/ packages for a particular PHP version. If you have an older or newer (supported) PHP version, you can download the Source code (zip)
for that release, and run composer to update the dependencies:
$ wget -O cops-3.x.x.zip https://github.com/mikespub-org/seblucas-cops/archive/refs/tags/3.x.x.zip
$ unzip cops-3.x.x.zip
$ cd seblucas-cops-3.x.x
$ composer update --no-dev -o
Source code
$ cd seblucas-cops
$ composer install --no-dev -o
Docker image
Home Assistant Add-on
The rest of the installation process is very similar to the original below. But if you install from source, just use your regular composer 2.x - you don't need to download an old composer 1.x version or install global asset plugins anymore :-)
Notice: for a first-time installation, you need to copy config/local.php.example to config/local.php and customize the calibre directory etc. as needed. Afterwards, if you get an error or blank page the first time you browse to COPS, you can check for common issues by browsing to http://.../checkconfig.php
COPS stands for Calibre OPDS (and HTML) Php Server.
See : COPS's home for more details.
Don't forget to check the Wiki.
In my opinion Calibre is a marvelous tool but is too big and has too much dependencies to be used for its content server.
That's the main reason why I coded this OPDS server. I needed a simple tool to be installed on a small server (Seagate Dockstar in my case).
I initially thought of Calibre2OPDS but as it generate static file no search was possible.
Later I added an simple HTML catalog that should be usable on my Kobo.
So COPS's main advantages are :
If you want to use the OPDS feed don't forget to specify feed.php at the end of your URL.
You just have to sync your Calibre directory to your COPS server the way you prefer (Dropbox, Bt Sync, Syncthing, use a directory shared with Nextcloud, ...).
On any Debian based Linux you can use :
apt-get install php5-gd php5-sqlite php5-json php5-intl
If you use Debian Stretch :
apt-get install php7.0-gd php7.0-sqlite3 php7.0-json php7.0-intl php7.0-xml php7.0-mbstring php7.0-zip
On Centos you may have to add : yum install php-xml
If you like Docker, you can also try this multiarch docker container from linuxserver.io It has builds for x64 and arm64.
git clone https://github.com/seblucas/cops.git # or download lastest zip see below
cd cops
# use standard composer 2.x now, no need to install older 1.x version and plugin for PHP 8.x version
#wget https://getcomposer.org/composer.phar
#php composer.phar global require "fxp/composer-asset-plugin:~1.1"
#php composer.phar install --no-dev --optimize-autoloader
composer install --no-dev --optimize-autoloader
After that you can use the previous how-to starting at the second step.
Note that instead of cloning you can also get latest master as zip
Note that if your PHP version is lower that 5.6, then you may have to remove composer.lock
before starting the last line.
Long story short : ALWAYS outside of COPS's directory especially if COPS is installed on a VPS / Server. If you follow my advice then your data will be safe.
If you choose to put your Calibre directory inside your web directory and use Nginx then you will have to edit /etc/nginx/mime.types to add these lines :
application/epub+zip epub;
application/x-mobipocket-ebook mobi prc azw;
Not a lot, except for the bad quality of the code (first PHP project ever) ;)
Please see https://github.com/seblucas/cops/issues for open issues
Please read https://github.com/seblucas/cops/wiki and check the FAQ.
As you could see here, I appreciate every contributions and there were a lot over time. So don't be shy and submit your Pull Requests.
Note to translators : please prefer using Transifex instead of doing a PR.
I only have one limit (I may have more but that one is the worse) : COPS' goal is to provide an alternative to Calibre's content server and not to replace Calibre entirely. So I will refuse any PR making changes to the database content.
External libraries used :
COPS - 2012-2019 (c) Sébastien Lucas
See LICENSE and file headers for license info