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
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Theodotos Andreou a51daaea0e Fixed typo in 'libraries' pirms 8 gadiem
icons Improve the compatibility with IOS pirms 10 gadiem
images Images for feed categories - new set pirms 8 gadiem
lang Update Localization_pt_PT.json pirms 8 gadiem
resources In case the filename contains non ASCII characters then follow rfc6266. fix #253 pirms 8 gadiem
styles Remove the stencil. Break the links. fix #148 pirms 10 gadiem
templates Fixed css to show filter correctly pirms 8 gadiem
test Use rawurlencode so that the spaces are remplaced by %20 and not +. Will hopefully help with IIS URL Rewriting pirms 8 gadiem
tools Remove all trailing whitespaces pirms 8 gadiem
.gitignore Added support for username based configs pirms 9 gadiem
.hgtags Étiquette 1.0.0RC3 ajoutée à la révision 681dce395a60 pirms 9 gadiem
.htaccess Reorder the .htaccess to make it more consistant pirms 8 gadiem
.travis.yml Change the way the build matrix is done so that the sauce addon is only enabled when it'll be actually used. pirms 8 gadiem
CHANGELOG Prepare the changelog for the next release pirms 8 gadiem
COPYING Add v0.0.1 pirms 12 gadiem
JSON_renderer.php Add another ugly hack to help Kindle. fix #165 pirms 9 gadiem
OPDS_renderer.php Fix the détection of bad publication date. fix #245 pirms 8 gadiem
README.md chore: advert the docker version. fix #215 pirms 8 gadiem
about.html Fixed typo in 'libraries' pirms 8 gadiem
author.php Fix author list when a book has many author. Was broken for a long time. pirms 9 gadiem
base.php Rating icons also for rating details pirms 8 gadiem
book.php Fix the détection of bad publication date. fix #245 pirms 8 gadiem
build.xml Update Phing file. pirms 10 gadiem
checkconfig.php Add a formal check for the PHP version. I still have a lot of people trying with PHP 5.2.X pirms 9 gadiem
composer.json Upgrade to latest sausage pirms 10 gadiem
config.php Added support for username based configs pirms 9 gadiem
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 pirms 9 gadiem
config_local.php.example Cleanly fix the problems with line feed pirms 10 gadiem
customcolumn.php Fix number of books per custom column value (missing for bootstrap template). fix #172 pirms 9 gadiem
data.php Add mimetype to most audiobooks formats around. fix #211 pirms 8 gadiem
epubfs.php Fix headers. re #52 pirms 10 gadiem
epubreader.php Change viewport in epubreader pirms 10 gadiem
favicon.ico Add v0.0.1 pirms 12 gadiem
feed.php Fix warnings an code enhancement. pirms 10 gadiem
fetch.php Duplicate pirms 10 gadiem
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. pirms 10 gadiem
index.php org\.ebookdroid pirms 8 gadiem
language.php Fix the remaining number of elements. re #79 pirms 10 gadiem
login.html Update jquery from 1.11.0 to 1.11.1 pirms 9 gadiem
phpunit.xml Add another ignored directory. pirms 10 gadiem
publisher.php Add the number of elements with the publishers. re #79 pirms 10 gadiem
rating.php Fix the remaining number of elements. re #79 pirms 10 gadiem
sendtomail.php Fix warnings an code enhancement. pirms 10 gadiem
serie.php Centralize a little the code pirms 10 gadiem
tag.php Unneeded constant pirms 10 gadiem
transliteration.php Transliteration of search text pirms 9 gadiem
util.js Forgot to make jshint happy ;). re #79 pirms 9 gadiem
web.config Add the rewrite rules for IIS. It's still mandatory to install http://www.iis.net/downloads/microsoft/url-rewrite. fix #249 pirms 8 gadiem

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