Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...) http://blog.slucas.fr/en/oss/calibre-opds-php-server
Přejít na soubor
Theodotos Andreou a51daaea0e Fixed typo in 'libraries' 2016-03-02 15:32:31 +02:00
icons Improve the compatibility with IOS 2013-08-11 19:32:07 +02:00
images Images for feed categories - new set 2016-01-13 19:43:33 +00:00
lang Update Localization_pt_PT.json 2016-02-22 18:18:43 +00:00
resources In case the filename contains non ASCII characters then follow rfc6266. fix #253 2016-02-19 17:04:23 +01:00
styles Remove the stencil. Break the links. fix #148 2014-03-28 04:12:10 +01:00
templates Fixed css to show filter correctly 2015-12-05 00:33:34 +01:00
test Use rawurlencode so that the spaces are remplaced by %20 and not +. Will hopefully help with IIS URL Rewriting 2016-02-13 06:28:56 +01:00
tools Remove all trailing whitespaces 2015-11-03 14:38:21 +01:00
.gitignore Added support for username based configs 2014-12-28 10:34:17 +01:00
.hgtags Étiquette 1.0.0RC3 ajoutée à la révision 681dce395a60 2014-12-29 17:54:38 +01:00
.htaccess Reorder the .htaccess to make it more consistant 2015-10-14 17:54:26 +02:00
.travis.yml Change the way the build matrix is done so that the sauce addon is only enabled when it'll be actually used. 2016-02-19 17:10:06 +01:00
CHANGELOG Prepare the changelog for the next release 2016-02-19 08:51:28 +01:00
COPYING Add v0.0.1 2012-05-28 07:01:33 +02:00
JSON_renderer.php Add another ugly hack to help Kindle. fix #165 2014-07-29 22:25:27 +02:00
OPDS_renderer.php Fix the détection of bad publication date. fix #245 2016-02-13 06:25:20 +01:00
README.md chore: advert the docker version. fix #215 2016-02-14 20:34:20 +01:00
about.html Fixed typo in 'libraries' 2016-03-02 15:32:31 +02:00
author.php Fix author list when a book has many author. Was broken for a long time. 2014-11-30 20:22:06 +01:00
base.php Rating icons also for rating details 2016-01-14 11:07:29 +00:00
book.php Fix the détection of bad publication date. fix #245 2016-02-13 06:25:20 +01:00
build.xml Update Phing file. 2014-03-20 16:00:54 +01:00
checkconfig.php Add a formal check for the PHP version. I still have a lot of people trying with PHP 5.2.X 2014-12-07 21:02:40 +01:00
composer.json Upgrade to latest sausage 2014-04-10 17:26:14 +02:00
config.php Added support for username based configs 2014-12-28 10:34:17 +01:00
config_default.php Add the Kindle 4 to the list of device which cannot handle client side rendering (note that Kindle 4 has a UA witn Kindle 3.0). fix #208 2015-05-14 18:37:15 +02:00
config_local.php.example Cleanly fix the problems with line feed 2013-07-22 14:29:32 +02:00
customcolumn.php Fix number of books per custom column value (missing for bootstrap template). fix #172 2014-08-27 17:28:40 +02:00
data.php Add mimetype to most audiobooks formats around. fix #211 2016-02-14 21:03:58 +01:00
epubfs.php Fix headers. re #52 2014-03-13 18:11:33 +01:00
epubreader.php Change viewport in epubreader 2014-04-08 20:30:26 +02:00
favicon.ico Add v0.0.1 2012-05-28 07:01:33 +02:00
feed.php Fix warnings an code enhancement. 2014-03-10 17:59:57 +01:00
fetch.php Duplicate 2014-02-13 18:03:38 +01:00
getJSON.php Big refactoring of the Json handling, I followed what I did from OPDS. It doesn't still feel right but I think it's better. 2014-01-07 21:22:35 +01:00
index.php org\.ebookdroid 2016-01-14 13:47:00 +00:00
language.php Fix the remaining number of elements. re #79 2014-06-03 21:40:45 +02:00
login.html Update jquery from 1.11.0 to 1.11.1 2014-10-16 17:30:44 +02:00
phpunit.xml Add another ignored directory. 2013-12-31 11:14:36 +01:00
publisher.php Add the number of elements with the publishers. re #79 2014-06-02 22:04:41 +02:00
rating.php Fix the remaining number of elements. re #79 2014-06-03 21:40:45 +02:00
sendtomail.php Fix warnings an code enhancement. 2014-03-10 17:59:57 +01:00
serie.php Centralize a little the code 2014-06-02 21:31:55 +02:00
tag.php Unneeded constant 2014-06-03 22:38:06 +02:00
transliteration.php Transliteration of search text 2015-05-28 15:16:03 +03:00
util.js Forgot to make jshint happy ;). re #79 2014-07-24 20:43:26 +02:00
web.config Add the rewrite rules for IIS. It's still mandatory to install http://www.iis.net/downloads/microsoft/url-rewrite. fix #249 2016-02-17 10:54:52 +01:00

README.md

COPS

COPS stands for Calibre OPDS (and HTML) Php Server.

See : COPS's home for more details.

Don't forget to check the Wiki.

Scrutinizer Quality Score

Code Coverage

Build Status

Selenium Test Status

Why ?

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 :

  • No need for many dependencies.
  • No need for a lot of CPU or RAM.
  • Not much code.
  • Search is available.
  • With Dropbox / owncloud it's very easy to have an up to date OPDS server.
  • It was fun to code.

If you want to use the OPDS feed don't forget to specify feed.php at the end of your URL.

Prerequisites

  1. PHP 5.3, 5.4, 5.5, 5.6 or hhvm with GD image processing, Libxml, Intl, Json & SQLite3 support.
  2. A web server with PHP support. I only tested with various version of Nginx. Other people reported it working with Apache and Cherokee. You can also use PHP embedded server (https://github.com/seblucas/cops/wiki/Howto---PhpEmbeddedServer)
  3. The path to a calibre library (metadata.db, format, & cover files).

On any Debian base Linux you can use : aptitude install php5-gd php5-sqlite php5-json php5-intl

On Centos you may have to add : yum install php-xml

Install

  1. Extract the zip file to a folder in web space (visible to the web server).
  2. If you're doing a first-time install, copy config_local.php.example to config_local.php
  3. Edit config_local.php to match your config.
  4. If needed add other configuration item from config_default.php

If you choose to put your Calibre directory inside your web directory then you will have to edit /etc/nginx/mime.types to add this line : application/epub+zip epub;

If you like Docker, you can also this project

Known problems

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

Need help

Please read https://github.com/seblucas/cops/wiki and check the FAQ.

Credits

External libraries used :

Copyright & License

COPS - 2012-2016 (c) S<>bastien Lucas

See COPYING and file headers for license info