[QPKG] COPS - Calibre OPDS

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
wakkaday
Getting the hang of things
Posts: 59
Joined: Tue Sep 15, 2015 1:00 am

Re: [QPKG] COPS - Calibre OPDS

Post by wakkaday » Sun Aug 07, 2016 9:34 pm

is there a way to download via an e-reader (kobo)

in my instance i can see the server/package etc but when i click 'epub' for example nothing happens, however on a phone it will give me the option to download

if i connect to the official calibre server running on osx/windows via my e-reader it will download

i hope you can advise
thank you

monoxddd
First post
Posts: 1
Joined: Tue Oct 11, 2016 12:41 pm

Re: [QPKG] COPS - Calibre OPDS

Post by monoxddd » Wed Oct 12, 2016 1:19 am

hi i dont understand this ", copy config_local.php.example to config_local.php" can you tell how to do this plz.
i got this error: You've been redirected because COPS is not configured properly
Database error

and this: Check if Calibre database file exists and is readable
File /share/CACHEDEV1_DATA/Multimedia/Librosmetadata.db not found, Please check

cwempe
Getting the hang of things
Posts: 60
Joined: Tue Apr 27, 2010 9:37 pm

Re: [QPKG] COPS - Calibre OPDS

Post by cwempe » Sat Oct 15, 2016 4:35 am

monoxddd wrote:hi i dont understand this ", copy config_local.php.example to config_local.php" can you tell how to do this plz.
i got this error: You've been redirected because COPS is not configured properly
Database error

and this: Check if Calibre database file exists and is readable
File /share/CACHEDEV1_DATA/Multimedia/Librosmetadata.db not found, Please check


Just copy the config_local.php.example file and rename it to config_local.php.
Or simply delete ".example" from the filename. But you might want to have a backup of tis example file.

cwempe
Getting the hang of things
Posts: 60
Joined: Tue Apr 27, 2010 9:37 pm

Re: [QPKG] COPS - Calibre OPDS

Post by cwempe » Sat Oct 15, 2016 4:37 am

Great package!.
Just installed it and it directly worked!

Just want to inform you that there is a final Version 1.0.0 available with some updates and fixes.
https://github.com/seblucas/cops/releases/tag/1.0.0

Would be nice to get an updated qpkg.

Thanks

Joy236
First post
Posts: 1
Joined: Sun Dec 20, 2015 3:13 am

Re: [QPKG] COPS - Calibre OPDS

Post by Joy236 » Mon Oct 17, 2016 11:42 pm


tazzi
Starting out
Posts: 15
Joined: Tue Aug 30, 2016 1:00 pm

Re: [QPKG] COPS - Calibre OPDS

Post by tazzi » Tue Oct 18, 2016 7:16 am

No real need for a qpkg. Download the zip, unzip it and copy the files into your COPS folder.

pxlla
New here
Posts: 3
Joined: Mon Apr 18, 2016 3:27 am

Re: [QPKG] COPS - Calibre OPDS

Post by pxlla » Sun Nov 13, 2016 5:26 am

I've been a longtime user of Calibre and been able to add books to my iPad from my Calibre library via the connect/share button within Calibre. My Calibre library resides at Box.com but I thought it would be a great idea to have an 'always on' OPDS via my QNAP NAS. I copied my 'Calibre Library' folder into my QNAP Public folder.

I've read every post on this thread and I can't find a place to start that make sense to me. I installed the QPKG and downloaded COPS. The folder downloaded as cops-1. I put this folder into the QNAP Web directory and then attempted to edit the renamed config_local.php file. I do not know where to find the path to my Calibre Library in the Public folder. I've seen /share/MD0_DATA/... many times in this thread. How exactly did you come up with this?

There's only 3 lines that need to be edited in the config_local.php file but instructions don't exist on how to properly edit this file so the whole shebang works. I've tried to be self-sufficient but I'm just confused. I'd appreciate any and all advice!

jubious
First post
Posts: 1
Joined: Mon Nov 14, 2016 1:26 am

Re: [QPKG] COPS - Calibre OPDS

Post by jubious » Mon Nov 14, 2016 1:51 am

Installation Instructions I used:

Prereq:

- I had a share setup on my QNAP called 'library' which contains my ebooks. This can be whatever you like 'books', 'ebooks' etc. Where I reference the 'library' share just change it for whatever share you've got setup.
- I'm making assumptions that you manually know how to install qpkg files on your QNAP

1. Download COPS qpkg and installed it on my TS-451+ --> https://drive.google.com/file/d/0B5-FPriSWYHXSVZXNUt0eHhQUVU/view?usp=sharing

2. Installed Calibre on my PC --> https://calibre-ebook.com/

3. During the initial setup of Calibre on my PC when it asks you 'Choose location for your books' I set my library share e.g \\QNAPNAS\Library. This step sets up the metadata.db which COPS requires.

4. Next I edited the config_default.php which comes along with COPS to point to the folder that contains metadata.db. To initially find config_default.php I cracked open WinSCP and found it in /share/web/cops (note this is just a symlink). In WinSCP I then just right clicked config_default.php > edit.

I updated the $config['calibre_directory'] entry as follows:

$config['calibre_directory'] = '/share/CACHEDEV1_DATA/Library/';

Note when browsing the symlink /share/library in WinSCP it shows the actual directory path. It may work by using /share/library. I haven't tried.

5. Saved config_default.php
6. Opened COPS which took me to https://<Internal IP>:8081/COPS/index.php and BOOM!

I hope this helps.

pxlla
New here
Posts: 3
Joined: Mon Apr 18, 2016 3:27 am

Re: [QPKG] COPS - Calibre OPDS

Post by pxlla » Fri Dec 30, 2016 2:55 am

Hi Jubious -- Thanks for your detailed post. I tried following along but being that I'm on a Mac it's impossible to find the location of the 'config_default.php' file in order to edit it. I should have mentioned that!

Slickums
Know my way around
Posts: 121
Joined: Fri Nov 25, 2016 6:51 am

Re: [QPKG] COPS - Calibre OPDS

Post by Slickums » Mon Jan 16, 2017 6:27 am

Hopefully this is the right board to post this...

I have a TS-251 with QTS 4.2.

I need to install COPS and be able to use the Pagekite reverse proxy service to provide access to my Calibre libraries to others via the Internet. Pagekite would not install directly in QTS, so installed the Linux Station with Ubuntu 16.04. Pagekite installed great, now I need to get COPS going.

My Calibre libraries, however, are in the QTS system at

Code: Select all

/share/Backups/Calibre/Calibre_Libraries


My Linux Station COPS is installed at

Code: Select all

admin@ubuntu_1604:/var/www/cops/


I have the same config_local.php in this new install, but need to change the library locations, ie while this works great in the QTS COPS install,

Code: Select all

$config['calibre_directory'] = array (
     "Lib1" => "/share/CACHEDEV1_DATA/Backups/Calibre/Calibre_Libraries/Lib1/",
     "Lib2" => "/share/CACHEDEV1_DATA/Backups/Calibre/Calibre_Libraries/Lib2/",
     "Lib3" => "/share/CACHEDEV1_DATA/Backups/Calibre/Calibre_Libraries/Lib3/",
     "Lib4" => "/share/CACHEDEV1_DATA/Backups/Calibre/Calibre_Libraries/Lib4/",
     "Lib5" => "/share/CACHEDEV1_DATA/Backups/Calibre/Calibre_Libraries/Lib5/;


I need to change these now in the Ubuntu install to point to those same libraries. They are rather big and I would really like to not have to move them!

Can this be done? Is there a way to link the two separate file systems? By linking, I mean change the config_local.php entries in the Ubuntu install to point to the original libraries in the normal QTS install with no library file moving/relocation involved.

I am simply not familiar enough with Linux or QTS or networking to figure this one out.

Thanks!

Slickums
Know my way around
Posts: 121
Joined: Fri Nov 25, 2016 6:51 am

Re: [QPKG] COPS - Calibre OPDS

Post by Slickums » Sat Jan 28, 2017 2:17 am

If I have the COPS installed via the available .qpkg, I believe I have cops v1.0.0., right?

If I then want to update it to cops v1.0.1, do I simply copy the unzipped files into the same folder as the already installed and working COPS v1.0.0?

I know I need to make sure the config files are not over written, but is there anything else I need to watch out for?

Thanks!

Slickums
Know my way around
Posts: 121
Joined: Fri Nov 25, 2016 6:51 am

Re: [QPKG] COPS - Calibre OPDS

Post by Slickums » Mon Jan 30, 2017 6:49 am

Slickums wrote:If I have the COPS installed via the available .qpkg, I believe I have cops v1.0.0., right?

If I then want to update it to cops v1.0.1, do I simply copy the unzipped files into the same folder as the already installed and working COPS v1.0.0?

I know I need to make sure the config files are not over written, but is there anything else I need to watch out for?

Thanks!


Well, impatient me, LoL. I went ahead and copied over the V1.0.1 install files into the current COPS V1.0.0 working folder. And it does work, up to a point.

As this image shows, I am missing some of the menu background/border graphics and layout formatting, tho much of the critical text and cover image is still there:
COPS_Graphics.png


Any idea which file(s) are the culprits here?

Perhaps it will be as simple as copying the original file back from the older version, perhaps not. Or hopefully a tweak to the file?

Thanks!
[edit] Just a quick update to clarify some of the above:
1. ALL the menus have this layout, ie everything shifted to the left side
2. No graphic borders or icons or backgrounds
3. The embedded links do work, ie I can download the mobi/epub titles, etc.
4. But, the full description page will not popup...this is as far as it gets.

Anyone? :idea:
You do not have the required permissions to view the files attached to this post.

Slickums
Know my way around
Posts: 121
Joined: Fri Nov 25, 2016 6:51 am

Re: [QPKG] COPS - Calibre OPDS

Post by Slickums » Wed Feb 01, 2017 5:11 am

Ok, hopefully basic webserver question about COPS when used with Qapache.

I have a normal install of COPS V1.0.0 working in the normal /share/Web folder.

But I want more logging information than the default QNAP Apache has available...at least I have been told it does not log incoming IP addresses, download activity, etc.

So I installed Qapache, which uses port 88 and goes into the /share/htdocs folder by default.

I then copied the /share/Web/COPS folder into the /share/htdocs folder. I also copied the /share/Web/index.php file over to the /share/htdocs folder. It already had a default index.html file.

If it helps, here are the contents of each of the folders:
Working COPS:

Code: Select all

[/share/Web] # ls -la
drwxrwxrwx    3 admin    administ      4096 Jan 31 09:38 ./
drwxrwxrwx   28 admin    administ      4096 Jan 31 11:09 ../
drwxrwxrwx    2 admin    administ      4096 Jan 31 08:03 @Recycle/
lrwxrwxrwx    1 admin    administ        37 Jan 31 09:38 COPS -> /share/CACHEDEV1_DATA/.qpkg/COPS/COPS/
-rw-r--r--    1 admin    administ      1601 Jan 31 08:04 index.php
[/share/Web] #


Non-Working COPS:

Code: Select all

[/share/htdocs] # ls -la
drwxrwxrwx    6 admin    administ      4096 Jan 31 13:30 ./
drwxrwxrwx   28 admin    administ      4096 Jan 31 11:09 ../
drwxrwxrwx    2 admin    administ      4096 Jan 31 09:19 @Recycle/
drwxrwxrwx    8 admin    administ      4096 Jan 31 10:48 Apache/
drwxrwxrwx    8 admin    administ      4096 Jan 31 12:54 COPS/
drwxrwxrwx    2 admin    administ      4096 Jan 31 10:48 cgi-bin/
-rw-r--r--    1 admin    administ      1601 Jan 31 13:30 index.html
-rwxr-xr-x    1 admin    administ        45 Jan 31 13:20 index.html.org*
-rwxrwxrwx    1 admin    administ       211 Jan 31 13:21 index.html.copstest*
-rw-r--r--    1 admin    administ      1601 Jan 31 12:40 index.php
-rwxrwxrwx    1 admin    administ        67 Jan 31 10:48 test.php*
[/share/htdocs] #

Note:
If I enter in my browser "192.168.x.xxx:88/index.html", that file displays properly! :D
If I enter in my browser "192.168.x.xxx:88/index.php", the url changes to "192.168.x.xxx:8080/cgi-bin/ and that of course pulls up the QNAP desktop. :(

My question is what do I need to change/setup to get COPS to pull up on the Qapache port 88 when I access it through the browser?

Thanks!

[Edit] Update. Well, I decided to try copying all the COPS files directly into the /share/htdocs folder, I also tried in using cops-1.0.1 files.

So now all the cops config files are in the root /share/htdocs folder, eliminating the COPS (for V1.0.0) and cops1.0.0 (for that version) folders.

The results are that now "192.168.x.xxx:88/index.php brings up the cops checkconfig.php menu, which is a step forward!

Some previous comments in this topic suggest this is not a very secure arrangement, but for now it is all that works given my knowledge of how Qapache works. I suspect with some twiddling of config files, it could be moved back to a more secure folder arrangement, but that is beyond me at this point.

LennyM
Know my way around
Posts: 101
Joined: Thu Sep 19, 2013 5:43 pm

Re: [QPKG] COPS - Calibre OPDS

Post by LennyM » Wed Feb 01, 2017 6:10 pm


darryl
New here
Posts: 2
Joined: Sat Nov 16, 2013 8:14 pm

Re: [QPKG] COPS - Calibre OPDS

Post by darryl » Sat Apr 29, 2017 9:00 am

I have had my TS-421 for many years, and am very happy with it. I have had the QPKG installed and working since not long after it came out. For some reason it failed after the last firmware update, but a quick re-install fixed it with no problems. Once I verified it was all working again I decided to update to 1.0.1, which I did by unzipping the downloaded file to the appropriate directory. Everything worked perfectly except the opds feed. Trying to use it via both Moon Reader and Marvin resulted in them not being able to find feed.php. I restored the previous version and this problem disappeared. I then tried 1.1.0 with the same result. I've made a number of attempts to fix the problem so far to no avail. I am quite happy with the older version which works but would like to update if I can solve the problem.

Any ideas would be appreciated.

Post Reply

Return to “Community Apps”