[QPKG] COPS - Calibre OPDS

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
D03er
First post
Posts: 1
Joined: Tue Apr 17, 2012 3:47 am

Re: [QPKG] COPS - Calibre OPDS

Post by D03er » Sun Feb 28, 2016 9:16 am

Shtirlits wrote:Hi guys

Anyone has a solution to the missing php5-intl dependancy?

Regards

Hi, Isaev :)
today I've tried to set it up second time. Yep! It works without php5-intl ! The main is to set up php5 !!! Note you can't install php5 qpkg on the system with qts 4.2 - only earlier 4.1 (if smbd knows how to do it - please tell me)

if other sections on error-page show "ok" - set the right path in the config.local.php and config_default.php and it will work!
I used this example base: http://forum.nas-central.org/viewtopic.php?p=96419
see the section "Sample library" and download it.

Suuuuper! Megarespect to author for this small and useful program.

User avatar
mmoxnes
Starting out
Posts: 41
Joined: Thu Sep 24, 2009 5:51 pm

Re: [QPKG] COPS - Calibre OPDS

Post by mmoxnes » Fri Apr 08, 2016 7:07 pm

just a little question, does this package only let you browse and read files alreadin in a populated database,
for managaing the database (adding books, changing meta data and so on), you will need to have a computer With calibre installed?


I hope that someone With better programmingskill than me can try to make a module so we also can manage the database from within this package
QNAP -TVS-EC880 + REXP-1000 Pro
Qnap TS 809
QNap TS 869

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Tue May 17, 2016 3:02 pm

I beg your pardon,

I have installed and configured COPS in my QNAP. It is located at Web/COPS. Okey
My libraries are situated at Multimedia/biblioteca/... and down there are three directories, ebooks one, ebooks two and ebooks three.

I have configured config_local.php as $config['calibre_directory'] = '/share/MD0_DATA/Multimedia/biblioteca/ebooks one/'; to try, doesn't find the metadata.db.
the same again with $config['calibre_directory'] = './share/MD0_DATA/Multimedia/biblioteca/ebooks one/'; nothing
again $config['calibre_directory'] = '/Multimedia/biblioteca/ebooks one/'; nothing..

please could some tell how shall I have to write it to work???

Thank you very much.
JuanJo

mtz_ro_2003
Know my way around
Posts: 129
Joined: Mon Nov 23, 2015 12:01 am

Re: [QPKG] COPS - Calibre OPDS

Post by mtz_ro_2003 » Tue May 17, 2016 3:10 pm

Are those directories (ebooks one, ebooks two, etc.) libraries created with Calibre?
Does the file metadata.db exists in those folders?
Be aware that COPS needs a Calibre library and will not work with some directories where you have some ebooks. COPS reads the metadata.db file, created by Calibre.
Model: TS-453 Pro 16GB - HyperX Impact, 16GB, DDR3, 1866MHz, CL11, 1.35v, Dual Channel Kit
Firmware: 4.2.1 build 20160601
Disks: 4 x 4TB WD Red (WD40EFRX) RAID5

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Wed May 18, 2016 1:03 am

Yes, thankyou. By now I make a full copy of library from PC to Qnap the real name of one library is Multimedia/biblioteca/Tercera and yes down this is its own metadata.db and so for each one, and every book in there.

I use an incremental copier so each library can be downloaded to PC and use it

I use filestation to look if I have a book when when in libraries, so to buy it or not ... I like paper reading too... jejeje

So I would be very grateful if you or anybody can tell what is the right $config['calibre_directory'] = './share/MD0_DATA/Multimedia/biblioteca/ebooks one/';

than you

JuanJo

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Wed May 18, 2016 1:26 am

Well, finally I got it.

this is the line $config['calibre_directory'] = '/share/Multimedia/biblioteca/Tercera/';

Now that I have your atention, hehehe, as I have three different libraries, hos can I do to configure the three of them for once not having to change the config file everytime?

:)
JuanJo

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Wed May 18, 2016 1:40 am

Excellent and perfectible. Thanks to the creator.

You see? The majority of Calibre users have a huge amount of books. So, if I open the "etiqueta" "Ciencia Ficción" put aaalll the books in one page is heavy work to the browser and the app. One better thing should be make 50 file pages or directly configurable by user.. It´s a first look at it with the possibility just asked about having several libraries and changing among them

Congratulations
JuanJo

mtz_ro_2003
Know my way around
Posts: 129
Joined: Mon Nov 23, 2015 12:01 am

Re: [QPKG] COPS - Calibre OPDS

Post by mtz_ro_2003 » Wed May 18, 2016 2:44 pm

I'm sorry, but you cannot use multiple Calibre libraries with only one instance of COPS.
One workaround would be to install 3 instance of COPS, each one configured to point to a different library, but this cannot be done by installing the QPKG and you have to do it manually...

You can configure the maximum number of books displayed... By default the setting is disabled, but can configure it how you like.
Just click the tool-wrench icon on the lower left corner of COPS home page.
Capture.JPG

Alternatively you can edit the config_default.php file and change $config['cops_max_item_per_page'] = "-1";.
You do not have the required permissions to view the files attached to this post.
Model: TS-453 Pro 16GB - HyperX Impact, 16GB, DDR3, 1866MHz, CL11, 1.35v, Dual Channel Kit
Firmware: 4.2.1 build 20160601
Disks: 4 x 4TB WD Red (WD40EFRX) RAID5

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Thu May 19, 2016 8:02 pm

Thank you mtz_ro_2003,

I'm not good at php, just in my first steps. I think it may be possible to do some kind of previous page, in which you can see if you have configured, even manually more tan one calibre directory, and so as you choose one it looks for it in the Qnap.

Something like configure_one = '/share/Multimedia/libraryONE/', "xxxxTWO/, "xxxxTHREE" and so on, and then as you choose one, make de proper $config['calibre_directory'] = '/share/Multimedia/LibraryCHOOSEN/'; with a Do case, if then or whatever thing uses php to accomplish one selection.

I think it would be fine...

About your explanation for how many lines or items I would like to see for page, I'm going to try it.

Thanks very much
JuanJo

aJuanJo
New here
Posts: 7
Joined: Tue Apr 05, 2016 7:37 pm
Location: Gandia, Valencia, Spain

Re: [QPKG] COPS - Calibre OPDS

Post by aJuanJo » Fri May 27, 2016 8:42 pm

Here's what I've arrived to achieve. I will put the config_local.php.example and three jpg as you can see my COPS web with three libraries. It could be better done, but I'm not very good at php. Just studied the code and found that $config['calibre _directory'] can be an array. You'll see.

Photos and the example code
Un saludo
JuanJo
PD. It won't let me forward config_local.php, so here is the code

----- code
<?php
if (!isset($config))
$config = array();

/*
* The directory containing calibre's metadata.db file, with sub-directories
* containing all the formats.
* BEWARE : it has to end with a /
*
* MODIFICATION, to put any number of libraries you have...
*/

/*
* I've made a small modification, due to my unexpertise in php, I'd have like to do it better.
* For now, just do this if you have more than one Calibre Library,
* such as c:/library/First Library/; c:/library/Second Library/ and so on.
* you can put this as follows, naming your library as you choose to distinguish each one.
*/

$config['calibre_directory'] = array('Name You Want to See' => 'c:/library/First Library/', 'My Preferred' => 'c:/library/Second Library/') ;

/* It is inside BASE.PHP assumed to take control of a multipledatabase configured,
* so just with this you can have any number of libraries you want.
* If you don't put names before paths in array it will show you "0", "1" and so on, disgusting, isn't it?
* of course this is an example for windows, use what you need to your SO.
* for QNAP if it is under Multimedia, then it should be, '/share/Multimedia/Library/First Library/' and so on.
*/


/*
* Catalog's title
*/
/* this is the first title page or the unique. If you have more than one then
* this could be the entrance to your FULL set of libraries
*/

$config['cops_title_default'] = "My Big Coleccion Of Libraries";

/* I continue studiyng COPS code, because of $config['cops_calibre_custom_column']
* which can also be an array. As to now I've tested it and it shows the name of the colum and
* how many books have it true by default. But if I click to see the selection, it doesn't show it but the rounding circle
* In any case, maybe someone knows better than me and gets it to work, here is an example
* I have to custom colums, read and fixed, so
* $config['cops_calibre_custom_column'] = array('Allready Read'=>'read', 'Fixed'=>'fixed');
* Hope to make it work soon, or somebody
*/

/*
* use URL rewriting for downloading of ebook in HTML catalog
* See README for more information
* 1 : enable
* 0 : disable
*/

$config['cops_use_url_rewriting'] = "0";
You do not have the required permissions to view the files attached to this post.

hsapiens
New here
Posts: 2
Joined: Fri Oct 14, 2011 5:14 pm

Re: [QPKG] COPS - Calibre OPDS

Post by hsapiens » Thu Aug 04, 2016 11:39 am

Hi there
I setup the COPS server on my qnap ts451 and I can access it perfectly on http://192.168.3.197/COPS/index.php but I dont know how to reach it from XXX.myqnapcloud.com???
Also on Moon Reader, when I add http://192.168.3.197/COPS/index.php in the Net Library section it goes blank. Why doesnt it work?

wakkaday
Getting the hang of things
Posts: 59
Joined: Tue Sep 15, 2015 1:00 am

Re: [QPKG] COPS - Calibre OPDS

Post by wakkaday » Sat Aug 06, 2016 5:21 am

does thus work on 4.2? the latest firmware

thanks

Afrosheen
Getting the hang of things
Posts: 85
Joined: Tue Dec 23, 2014 3:51 pm

Re: [QPKG] COPS - Calibre OPDS

Post by Afrosheen » Sat Aug 06, 2016 6:02 am

Yes it works for me.

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 4:19 am

ok i need a simple guide
my database is saved on dropbox...
i wil try and follow the first link

im new to qnap and php/web servers etc..

thanks

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 4:48 am

brillaint i think i managed to do it
so from my ebook i should be able to access my server nas at any time... i will try it out

Post Reply

Return to “Community Apps”