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
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.0KB

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