[QPKG] COPS - Calibre OPDS

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

[QPKG] COPS - Calibre OPDS

Post by goormans »

[Name]
COPS

[Description]
Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)

[Version]
COPS: 1.0.0RC3
QPKG: 150111

[Resource]
http://blog.slucas.fr/en/oss/calibre-opds-php-server
https://github.com/seblucas/cops

[Download]
COPS QPKG: Download COPS V150111 qpkg for all QNAP series

[Install]
1. download ans install the qpkg.
2. If a first-time install, copy config_local.php.example to config_local.php (located here: Web/COPS/...)
3. Edit config_local.php to match your config. The most important config item to edit are :
$config['calibre_directory'] : Path to your Calibre directory.
$config['cops_use_url_rewriting'] : If you want to enable URL rewriting.
4. Add some other config item from config_default.php


note:
Please report any problems or improvements I can do, thanks and enjoy!
Last edited by goormans on Fri Feb 13, 2015 6:10 pm, edited 1 time in total.
007scullynz
New here
Posts: 3
Joined: Tue Jan 13, 2015 9:46 am

Re: [QPKG] COPS - Calibre OPDS

Post by 007scullynz »

Hi there

How do I work out what the actual calibre folder location is?? I have a TS-412 running the latest firmware. I created a directory at the same level as "Web" called "eBooks" then "Library" under it, but "./eBooks/Library/" doesn't work, so it's probably not the actual folder location.

Thanks and regards
Andrew
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

Re: [QPKG] COPS - Calibre OPDS

Post by goormans »

you have to edit the file config_local.php located at your .qpkg directory -> /share/MD0_DATA/.qpkg/COPS/COPS
your library doesn't have to be on a public folder.
mine folder is located at mine multimediafolder -> /share/MD0_DATA/Multimedia/ebooks/

so mine config_local.php file looks like this:
$config['calibre_directory'] = '/share/MD0_DATA/Multimedia/ebooks/';
jethro10
Starting out
Posts: 34
Joined: Thu Feb 16, 2012 9:15 pm

Re: [QPKG] COPS - Calibre OPDS

Post by jethro10 »

Great! I'm off to give it a try :-)
tomas.kazragis
New here
Posts: 9
Joined: Sun Aug 24, 2014 5:42 pm

Re: [QPKG] COPS - Calibre OPDS

Post by tomas.kazragis »

Hi

can someone help me with starting COPS? The case is that my library is located in Dropbox. I sync Dropbox with my Qnap. I've set following configuration in COPS:
$config['calibre_directory'] = '/share/CACHEDEV1_DATA/homes/Fly/Dropbox/Library/';

The library is definitely there. I've checked from ssh by trying to vi it. It opens without problems. However when I start COPS, I get error "File /share/CACHEDEV1_DATA/homes/Fly/Dropbox/Library/metadata.db not found, Please check".

When I move metdata.db somewhere else, e.g.:
$config['calibre_directory'] = '/share/CACHEDEV1_DATA/Download/';

it works fine... I guess the problem is permissions, I gave -rwxrwxrwx permissions for metadata.db file located in home folder. Did not helped...

Any ideas how to solve this puzzle? :) Thanks.


T.K.
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

Re: [QPKG] COPS - Calibre OPDS

Post by goormans »

maybe a typo? capitals?
tomas.kazragis
New here
Posts: 9
Joined: Sun Aug 24, 2014 5:42 pm

Re: [QPKG] COPS - Calibre OPDS

Post by tomas.kazragis »

definitely not typo using the same path vi opens file without problems. I guess it is related to home folder.

Does someone knows under which user this COPS is running? Maybe this user has limited permissions?
luoto
New here
Posts: 8
Joined: Thu Aug 06, 2009 5:39 pm

Re: [QPKG] COPS - Calibre OPDS

Post by luoto »

This looks very exciting but I am very unsure about trying to edit the server.

Would the changes one has to make manually be something that could be rolled into a point and click menu or package in the future, or is this technically impossible?

I'd love to see a combination of this/Calibre and a true, intelligent full text search engine, so it could search ALL the books in a google type search. Sitting on my QNAP would be even better! Could this dream exist?
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

Re: [QPKG] COPS - Calibre OPDS

Post by goormans »

luoto wrote:This looks very exciting but I am very unsure about trying to edit the server.
you only have to edit the file config_local.php
located here: Web/COPS/...


following these steps and your dreams come true :

1. download ans install the qpkg.
2. If a first-time install, copy config_local.php.example to config_local.php
3. Edit config_local.php to match your config. The most important config item to edit are :
$config['calibre_directory'] : Path to your Calibre directory.
$config['cops_use_url_rewriting'] : If you want to enable URL rewriting.
4. Add some other config item from config_default.php
luoto
New here
Posts: 8
Joined: Thu Aug 06, 2009 5:39 pm

Re: [QPKG] COPS - Calibre OPDS

Post by luoto »

Thank you for the kind, detailed reply. Is this something I edit with "SSH" or is there some web interface to make the copying elements? I am sure it will be fine, but I've read about so many people doing bad things to their NAS to have kept away from the non web interface for now! Sorry for so many questions :)
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

Re: [QPKG] COPS - Calibre OPDS

Post by goormans »

luoto wrote:Thank you for the kind, detailed reply. Is this something I edit with "SSH" or is there some web interface to make the copying elements?
You don't have to use a SSH client, You can acces everything using your Filestation.
-Download the file
-edit using a text editor ( i suggest to use notepad++)
-Upload again :mrgreen:
miwiiti
Starting out
Posts: 10
Joined: Fri Sep 28, 2012 11:34 pm

Re: [QPKG] COPS - Calibre OPDS

Post by miwiiti »

Thanks for the application,but I can not use it:

You've been redirected because COPS is not configured properly
Database error
Check if PHP version is correct
OK (5.3.29)
Check if GD is properly installed and loaded
OK
Check if Sqlite is properly installed and loaded
OK
Check if libxml is properly installed and loaded
OK
Check if Json is properly installed and loaded
OK
Check if mbstring is properly installed and loaded
OK
Check if intl is properly installed and loaded
Please install the php5-intl extension and make sure it's enabled
Check if Normalizer class is properly installed and loaded
Please make sure intl is enabled in your php.ini
Check if the rendering will be done on client side or server side
Client side rendering
Check if Calibre database path is not an URL
OK
Check if Calibre database file exists and is readable
File / share / MD0_DATA / Alejandria /metadata.db not found, Please check

Value of $config['calibre_directory'] in config_local.php
Value of open_basedir in your php.ini
The access rights of the Calibre Database
Synology users please read this
TS 221 firmware 4.1.2
A hand please...
Thank You.
goormans
New here
Posts: 9
Joined: Sat Apr 12, 2014 3:07 pm

Re: [QPKG] COPS - Calibre OPDS

Post by goormans »

miwiiti wrote: Check if Calibre database file exists and is readable
File / share / MD0_DATA / Alejandria /metadata.db not found, Please check
Your path is wrong
i guess you should channge it to: (if thats the path to your library)
$config['calibre_directory'] = '/share/MD0_DATA/Alejandria/'
miwiiti
Starting out
Posts: 10
Joined: Fri Sep 28, 2012 11:34 pm

Re: [QPKG] COPS - Calibre OPDS

Post by miwiiti »

Thank you very much for answering. Now it works fine.

Enviado desde mi LG-V500 mediante Tapatalk
Afrosheen
Getting the hang of things
Posts: 90
Joined: Tue Dec 23, 2014 3:51 pm

Re: [QPKG] COPS - Calibre OPDS

Post by Afrosheen »

Hi is it possible to change the port from 80 to something else for this package? I have my Mac Mini Server running on the same LAN and I can't open port 80 for both devices.

Edit: I found out that I can edit the Web Server's port which did the trick for me.
Post Reply

Return to “Community Apps”