2016-02-14 21:27:21 +02:00
|
|
|
|
# COPS
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2012-07-02 21:27:46 +03:00
|
|
|
|
COPS stands for Calibre OPDS (and HTML) Php Server.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
See : [COPS's home](http://blog.slucas.fr/en/oss/calibre-opds-php-server) for more details.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
Don't forget to check the [Wiki](https://github.com/seblucas/cops/wiki).
|
|
|
|
|
|
|
|
|
|
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/seblucas/cops/badges/quality-score.png?s=e1c87a92ef90b8d666cd9bd4f3612bd10db84364)](https://scrutinizer-ci.com/g/seblucas/cops/)
|
|
|
|
|
|
|
|
|
|
[![Code Coverage](https://scrutinizer-ci.com/g/seblucas/cops/badges/coverage.png?s=1e21d8c3bf96d7b0b7cc0e54429fa897ddea1506)](https://scrutinizer-ci.com/g/seblucas/cops/)
|
|
|
|
|
|
|
|
|
|
[![Build Status](https://travis-ci.org/seblucas/cops.png)](https://travis-ci.org/seblucas/cops)
|
|
|
|
|
|
|
|
|
|
[![Selenium Test Status](https://saucelabs.com/browser-matrix/seblucas.svg)](https://saucelabs.com/u/seblucas)
|
|
|
|
|
|
|
|
|
|
# Why ?
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2014-05-24 22:33:54 +03:00
|
|
|
|
In my opinion Calibre is a marvelous tool but is too big and has too much
|
2012-05-28 08:05:05 +03:00
|
|
|
|
dependencies to be used for its content server.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2014-05-24 22:33:54 +03:00
|
|
|
|
That's the main reason why I coded this OPDS server. I needed a simple
|
2012-05-28 08:01:33 +03:00
|
|
|
|
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.
|
|
|
|
|
|
2012-07-22 15:49:57 +03:00
|
|
|
|
Later I added an simple HTML catalog that should be usable on my Kobo.
|
2012-07-02 21:27:46 +03:00
|
|
|
|
|
2012-05-28 08:01:33 +03:00
|
|
|
|
So COPS's main advantages are :
|
2012-05-28 08:05:05 +03:00
|
|
|
|
* No need for many dependencies.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
* No need for a lot of CPU or RAM.
|
|
|
|
|
* Not much code.
|
|
|
|
|
* Search is available.
|
2012-07-02 21:27:46 +03:00
|
|
|
|
* With Dropbox / owncloud it's very easy to have an up to date OPDS server.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
* It was fun to code.
|
2014-05-24 22:33:54 +03:00
|
|
|
|
|
2013-01-06 10:36:19 +02:00
|
|
|
|
If you want to use the OPDS feed don't forget to specify feed.php at the end of your URL.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Prerequisites
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-01 08:40:45 +02:00
|
|
|
|
1. PHP 5.3, 5.4, 5.5, 5.6 or hhvm with GD image processing, Libxml, Intl, Json & SQLite3 support.
|
2012-07-02 21:27:46 +03:00
|
|
|
|
2. A web server with PHP support. I only tested with various version of Nginx.
|
2014-07-21 22:11:52 +03:00
|
|
|
|
Other people reported it working with Apache and Cherokee. You can also use PHP
|
|
|
|
|
embedded server (https://github.com/seblucas/cops/wiki/Howto---PhpEmbeddedServer)
|
2012-05-28 08:01:33 +03:00
|
|
|
|
3. The path to a calibre library (metadata.db, format, & cover files).
|
|
|
|
|
|
|
|
|
|
On any Debian base Linux you can use :
|
2016-02-01 08:40:45 +02:00
|
|
|
|
aptitude install php5-gd php5-sqlite php5-json php5-intl
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2015-10-14 18:53:59 +03:00
|
|
|
|
On Centos you may have to add :
|
|
|
|
|
yum install php-xml
|
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Install
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
|
|
|
|
1. Extract the zip file to a folder in web space (visible to the web server).
|
2014-04-06 22:18:59 +03:00
|
|
|
|
2. If you're doing a first-time install, copy config_local.php.example to config_local.php
|
2012-05-28 08:01:33 +03:00
|
|
|
|
3. Edit config_local.php to match your config.
|
2013-01-25 22:04:10 +02:00
|
|
|
|
4. If needed add other configuration item from config_default.php
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Known problems
|
2012-10-11 22:14:28 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
Not a lot, except for the bad quality of the code (first PHP project ever) ;)
|
2012-07-02 21:42:55 +03:00
|
|
|
|
|
2013-01-25 22:04:10 +02:00
|
|
|
|
Please see https://github.com/seblucas/cops/issues for open issues
|
2012-07-02 21:42:55 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Need help
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2013-12-31 16:54:55 +02:00
|
|
|
|
Please read https://github.com/seblucas/cops/wiki and check the FAQ.
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Credits
|
2012-05-29 21:10:41 +03:00
|
|
|
|
|
|
|
|
|
* Locale message handling is inspired of http://www.mind-it.info/2010/02/22/a-simple-approach-to-localization-in-php/
|
|
|
|
|
* str_format function come from http://tmont.com/blargh/2010/1/string-format-in-php
|
2014-05-24 22:33:54 +03:00
|
|
|
|
* All icons come from Font Awesome : http://fontawesome.github.io/Font-Awesome/
|
2016-02-14 21:27:21 +02:00
|
|
|
|
* The unofficial OPDS validator : http://opds-validator.appspot.com/
|
2013-12-31 16:54:55 +02:00
|
|
|
|
* Thanks to all testers, translators and contributors.
|
2016-01-13 21:43:33 +02:00
|
|
|
|
* Feed icons made by Freepik from Flaticon website licensed under Creative Commons BY 3.0 http://www.flaticon.com and http://www.freepik.com
|
2014-05-24 22:33:54 +03:00
|
|
|
|
|
|
|
|
|
External libraries used :
|
2012-10-20 06:41:19 +03:00
|
|
|
|
* JQuery : http://jquery.com/
|
2013-06-25 12:54:06 +03:00
|
|
|
|
* Magnific Popup : http://dimsemenov.com/plugins/magnific-popup/
|
2013-01-02 22:50:44 +02:00
|
|
|
|
* Php-epub-meta : https://github.com/splitbrain/php-epub-meta with some modification by me
|
|
|
|
|
https://github.com/seblucas/php-epub-meta
|
|
|
|
|
* TbsZip : http://www.tinybutstrong.com/apps/tbszip/tbszip_help.html
|
2013-06-25 12:54:06 +03:00
|
|
|
|
* DoT.js : http://olado.github.io/doT/index.html
|
|
|
|
|
* PHPMailer : https://github.com/PHPMailer/PHPMailer
|
|
|
|
|
* js-lru : https://github.com/rsms/js-lru
|
2012-05-29 21:10:41 +03:00
|
|
|
|
|
2016-02-14 21:27:21 +02:00
|
|
|
|
# Copyright & License
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
2016-02-14 21:13:20 +02:00
|
|
|
|
COPS - 2012-2016 (c) S<>bastien Lucas <sebastien@slucas.fr>
|
2012-05-28 08:01:33 +03:00
|
|
|
|
|
|
|
|
|
See COPYING and file headers for license info
|
|
|
|
|
|