Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 01-30-2017, 09:28 AM   #1441
danilodb
Junior Member
danilodb began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: none
Hi everyone! I'm a new user of COPS and i'm trying to get things working on a Synology NAS. I've installed it and figured out how to get it to read from my directory by-passing open_basedir issue, but now i'm stuck over trying to get custom columns out of my calibre library. I have found config_local.php.example in path /usr/local/cops/share/cops and save it as config_local.php but every change I do in there seems to be useless.
Can someone please help understand if I'm doing something wrong?
Thanks in advance
danilodb is offline   Reply With Quote
Old 01-30-2017, 11:33 AM   #1442
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@danilodb

I do not have a clue about how to work with custom columns in calibre and/or COPS, but maybe I can point you in a favourable direction.

In config_default.php there are some settings you might need. Copy these settings to your config_local.php. The settings are:
Code:
    /*
     * Custom Columns for the index page
     * to add as an array containing the lookup names configured in Calibre
     *
     * For example : array ("genre", "mycolumn");
     *
     * Note that the composite custom columns are not supported
     */
    $config['cops_calibre_custom_column'] = array();

    /*
     * Custom Columns for the list representation
     * to add as an array containing the lookup names configured in Calibre
     *
     * For example : array ("genre", "mycolumn");
     *
     * Note that the composite custom columns are not supported
     */
    $config['cops_calibre_custom_column_list'] = array ();

    /*
     * Custom Columns for the book preview panel
     * to add as an array containing the lookup names configured in Calibre
     *
     * For example : array ("genre", "mycolumn");
     *
     * Note that the composite custom columns are not supported
     */
    $config['cops_calibre_custom_column_preview'] = array ();
I don't know how it works but I hope it helps you.
mariosipad is offline   Reply With Quote
Advert
Old 02-01-2017, 03:09 AM   #1443
danilodb
Junior Member
danilodb began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: none
Thanks so much for your help. Actually I was doing good but I was editing wrong file... There is another copy of config_local.php in /var/services/web/cops (this is the path on my Synology NAS DS216play) editing that one all went good.

Thanks again
danilodb is offline   Reply With Quote
Old 02-03-2017, 01:03 PM   #1444
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Well, I am losing hair and grinding down the teeth over this QNAP/COPS/Apache thing.

I have had to completely reset the QNAP system 3 times in the last month, simply because I don't know the ramifications of editing various COPS files, Apache conf files, etc. I am a learn-by-doing advocate, but enough is enough!

Much of the problem is me wanting to install cops v1.0.1 over an existing v1.0.0 install. The posts in this thread clearly indicate all you need to do is unzip v1.0.1 and copy the contents into the existing COPS install folder.

For whatever reason, that simply does not work. So my first question is:

What is the benefit of using v1.0.1?

The changelog shows 6 'fixes', none of which seem to be more than cosmetic. So is it a big deal to stick with v1.0.0?

My second question is:

v1.0.0 has a (to me, a real noob) convoluted install in the QNAP in:

Code:
/share/CACHEDEV1_DATA/.qpkg/COPS/COPS
The contents of the first COPS folder is:
Code:
[/share/Web/COPS] # ls -la /share/CACHEDEV1_DATA/.qpkg/COPS
drwxr-xr-x    3 admin    administ      4096 Feb  2 14:53 ./
drwxrwxrwx   12 admin    administ      4096 Feb  3 10:24 ../
-rw-r--r--    1 admin    administ      4505 Feb  2 13:38 .list
-rw-r--r--    1 admin    administ      3861 Jan 11  2015 .qpkg_icon.gif
-rw-r--r--    1 admin    administ      3861 Jan 11  2015 .qpkg_icon_80.gif
-rw-r--r--    1 admin    administ      2401 Jan 11  2015 .qpkg_icon_gray.gif
-rwxr-xr-x    1 admin    administ       762 Feb  2 13:38 .uninstall.sh*
drwxr-xr-x    8 admin    administ      4096 Feb  2 20:18 COPS/
-rwxr-xr-x    1 admin    administ      1697 Jan 11  2015 COPS.sh*
-rw-r--r--    1 admin    administ      1400 Feb  3 10:10 accesCops.htpasswd
-rw-r--r--    1 admin    administ        43 Jan 11  2015 accesCops.htpasswd.org
[/share/Web/COPS] #
The second COPS folder contains all the normal COPS files and sub-folders, and appears to be "simlinked" to /share/Web/COPS.

So, if I do copy v1.0.1 files/folders into /share/Web/COPS, how about the "index.php" file that comes with v1.0.1? Should I copy it into the /share/Web folder over the original v1.0.0 version?

I really am trying to make this work. I gave up on QApache, which supposedly had better logging options, and am trying to make this work with plain old Apache and .htaccess.

I am frustrated that to me, this is so obtuse. It is as if it was all aimed at web designers, CNE's or php/json coders. By that I mean if a .qpkg is made for v1.0.0, why isn't v1.0.1 updated with a .qpkg. I realize the developer has larger fish to fry, but if it is supported and new versions released, why force noobs like me to lose more hair trying to dig into the install minutia to make the dang thing work? I really don't have that much hair to lose...

Sorry for venting, but there it is. The actual questions above are few, but any tips/hints at all might point me to a solution.

Thanks!
MontyJ is offline   Reply With Quote
Old 02-03-2017, 04:14 PM   #1445
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Quote:
What is the benefit of using v1.0.1?

The changelog shows 6 'fixes', none of which seem to be more than cosmetic. So is it a big deal to stick with v1.0.0?
The difference between version 1.0.0 and 1.0.1 is not worth cutting your hair and pulling your teeth over.
If version 1.0.0 works for you there is no compelling reason to "upgrade" to version 1.0.1. For the time being I suggest you stay with 1.0.0. and enjoy a working system.

As to your second question:
The .qpkg package probably is not made by the developer of COPS, but by someone in the QNAP community (or QNAP themselves). Version 1.0.1 is simply to "new" (or has not enough fixes and/or enhancements to warrant a new .qpkg package).

I you still want to "upgrade" to version 1.0.1 you should copy all the new COPS files in /share/CACHEDEV1_DATA/.qpkg/COPS/COPS .

If in the future you want to upgrade to version 1.0.2/1.1.0 (they are the same?) DON'T!!!.
For this you really should wait for a .qpkg package or really know what you are doing.

In my experience the developers of Synology and QNAP make their filesystems needlessly complicated. Perhaps for a (good) reason. But after wrestling with a Synology in the past I can relate to your "frustration".
mariosipad is offline   Reply With Quote
Advert
Old 02-24-2017, 06:14 PM   #1446
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Hello,

I have a look on the exemple you provided and I think there is a great potential but I don't understand what is the link of COPS with Calibre ? I have a Calibre in my windows with all my epub stored on my computer.
COPS will allows me to have all my pdf stored in the nas and accessible using an HTML interface. Calibre will be able also to reach the epub stored in the NAS ? Do I only have to tell calibre to choose a directory stored in the nas to work ?

thanks a lot for your help
iostrym is offline   Reply With Quote
Old 02-24-2017, 06:56 PM   #1447
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by iostrym View Post
Hello,

I have a look on the exemple you provided and I think there is a great potential but I don't understand what is the link of COPS with Calibre ? I have a Calibre in my windows with all my epub stored on my computer.
COPS will allows me to have all my pdf stored in the nas and accessible using an HTML interface. Calibre will be able also to reach the epub stored in the NAS ? Do I only have to tell calibre to choose a directory stored in the nas to work ?

thanks a lot for your help
COPS is a way to share Calibre libraries w/o having to run Calibre itself and its much larger overhead requirements. Check out the links at the beginning of this thread for the developers details. It has a nice interface and works on machines like QNAP and Synology that typically aren't as powerful as PC's or even laptops. If you don't need full blown Calibre but want to share your library over your network or even the Internet, as in my case, COPS is an ideal solution.
MontyJ is offline   Reply With Quote
Old 02-25-2017, 02:45 AM   #1448
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Quote:
Originally Posted by MontyJ View Post
COPS is a way to share Calibre libraries w/o having to run Calibre itself and its much larger overhead requirements. Check out the links at the beginning of this thread for the developers details. It has a nice interface and works on machines like QNAP and Synology that typically aren't as powerful as PC's or even laptops. If you don't need full blown Calibre but want to share your library over your network or even the Internet, as in my case, COPS is an ideal solution.
Thanks a lot. After reading more, the way it works is:
Place library of calibre on the Nas ( but you won't be able to use two calibre installation on different PC to use it because of right problem and so on)
Install cops on the Nas and I will be able to share the content of library using HTML server.

Things that I don't know :
Cops is able to edit file ( add metadata inside epub or PDF ?) If yes, no problem if calibre is working in same time ?
I have then the feeling that calibre don't work with cops as it don't know that cops exist. Right ?
Cops can be accessed from outside (I may say yes using correct redirection)
Is there a user feature with logon to cops?

Thanks a lot
iostrym is offline   Reply With Quote
Old 02-25-2017, 09:11 AM   #1449
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by iostrym View Post
Thanks a lot. After reading more, the way it works is:
Place library of calibre on the Nas ( but you won't be able to use two calibre installation on different PC to use it because of right problem and so on)
Install cops on the Nas and I will be able to share the content of library using HTML server.

Things that I don't know :
Cops is able to edit file ( add metadata inside epub or PDF ?) If yes, no problem if calibre is working in same time ?
I have then the feeling that calibre don't work with cops as it don't know that cops exist. Right ?
Cops can be accessed from outside (I may say yes using correct redirection)
Is there a user feature with logon to cops?

Thanks a lot
Quote:
Cops is able to edit file ( add metadata inside epub or PDF ?) If yes, no problem if calibre is working in same time ?
No editing or changing Calibre files in any way through COPS. Calibre does not know or care about COPS, and COPS does not know or care about Calibre. COPS operates in "read only" mode as it gets its data from the Calibre libraries, or copy of the libraries in a setup like mine.

Quote:
I have then the feeling that calibre don't work with cops as it don't know that cops exist. Right ?
That is correct.
Quote:
Cops can be accessed from outside (I may say yes using correct redirection)
Is there a user feature with logon to cops?
Yes, it can be setup as a webpage. COPS itself does not have any user login features. You need to do that via a web server like Apache or other of your choice.

It is really a nice setup. Since I use the QNAP as the backup for my Calibre libraries, adding COPS means Calibre itself does not have to be on and running all the time. My goal was to provide 24x7 access to some of my Calibre libraries to others via the Internet w/o needing to keep my main, power hungry PC on all the time. The QNAP NAS box has minimal power usage so can be left on all the time.

So when I made changes/additions to Calibre, I run my backup program to add those changes to the backup on the NAS so the Calibre libraries are duplicated exactly. COPS then automatically picks up any changes it sees on the NAS; no further adjusting or maintenance required for COPS.

Calibre does have a 'Calibre Server' built in you can use, but as I mentioned before, my remote users need 24x7 access. And while the Calibre Server method method worked, it was not ideal because I had to leave my main PC on all the time. Since I am doing a backup anyway, using COPS on that backup was the ideal solution.
MontyJ is offline   Reply With Quote
Old 02-28-2017, 06:15 PM   #1450
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Thanks à lot. I use the Nas myself also for this. I need to try it. Let's go ;-)
iostrym is offline   Reply With Quote
Old 03-02-2017, 05:16 AM   #1451
hugoheitz
Enthusiast
hugoheitz began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Apr 2014
Location: Brest, France
Device: kobo touch, kindle paperwhite, Asus TF101
Problem to use the send to function.

I use COPS on my Synology NAS, it works well.
I have acquired a kindle paperwhite, I would like to use the send to function.
Is there a tutorial on that ?

I modified the config file (config-local.php) to insert the section about sendto.
I choose to use the gmail account
Now when I click on the title of a book, I have a mail icon that is present.
But when I click on it, first I have a mail to provide (I assume it is the destination mail), once done I have an error from gmail about authentification.

Does anyone know what to do ?

Is there something I need to do on the gmail side ? (maybe authorize the application)
If it is the case : can you please explain how to do ?

Thanks for your help !
hugoheitz is offline   Reply With Quote
Old 03-02-2017, 05:27 AM   #1452
hugoheitz
Enthusiast
hugoheitz began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Apr 2014
Location: Brest, France
Device: kobo touch, kindle paperwhite, Asus TF101
OK. I found the solution.
It seems to need authorization on Gmail account.
I dont get the error anymore.

Last edited by hugoheitz; 03-02-2017 at 05:33 AM.
hugoheitz is offline   Reply With Quote
Old 03-04-2017, 06:32 AM   #1453
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
hello, in the wiki concerning cops installation on Synology, it is said :

"2) Change your open_basedir
I choose to install in a shared folder named "logiciel" and the full path is :
/volume1/logiciel/feedbook"

what is the folder /volume1/logiciel/feedbook ? the database folder ? the installation of cops ? if it is the cops installation how do you know where it is installed ? i don't choose anything concerning cops installation folder before installing it throught packet manager.

if this path is the database folder, I did it but when accessing to http://192.168.1.50/cops => error 404 or 403...

I did all what is written there : https://github.com/seblucas/cops/wiki/Howto---Synology

except that I don't know where to find all .php file that it is said that I could modify. => [EDIT] file found and modified. I modify only config_local.php.example and rename it config_local.php. (no change for me, still not working) by the way, it is strange because path set during cops installation wasn't already set in config_local.php file... path was "./"...

I think something very important is not done as I don't reach the COPS webpage... for me it is not a database problem but cops or php confguration problem... By the way I use DSM 6.1

Is it possible to modify the calibre database path after cops installation ? because I don't set it correclty during installation, is it possible to modify it afterward ? without having to desinstall it and reinstall it after ?

Last edited by iostrym; 03-05-2017 at 06:44 PM.
iostrym is offline   Reply With Quote
Old 03-06-2017, 01:33 PM   #1454
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 725
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@iostrym

What is the output of http://192.168.1.50/cops/checkconfig.php ?

And, yes, it is possible to modify the database path after installation.
mariosipad is offline   Reply With Quote
Old 03-06-2017, 04:09 PM   #1455
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
hi thanks for your answer.

eveything is OK except :


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 /volume2/ebook/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


Concerning access to database :

/volume2/ebook$ ls -la meta*
-rwxrwxrwx+ 1 http users 277504 Mar 5 21:43 metadata.db
-rwxrwxrwx+ 1 toto users 17159 Mar 5 21:33 metadata_db_prefs_backup.json


/volume2$ ls -la
total 8420
drwxr-xr-x 24 root root 4096 Mar 6 03:08 .
drwxr-xr-x 22 root root 4096 Mar 6 03:08 ..
...
drwxrwxrwx+ 43 http root 4096 Mar 5 22:21 ebook


And in open_basedir :

/tmp:/var/services/tmp:/var/services/web:/var/services/homes:/volume2/ebook/

And concerning access to @appstore/cops/share/cops/config_local.php :

<?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 /
*/
$config['calibre_directory'] = '/volume2/ebook/';

/*


I don't see where the problem is... probably in right access of the shared folder "ebook" ? but except give all access to http, is there something else to do ?

I don't know if it is a clue for the problem but using a find & grep for "calibre_database", I've found :

./var/services/web/cops/config_local.php: $config['calibre_directory'] = './calibre_database_test/';

So which config_local.php do I need to modify ? the one in /var/services/web/cops/ ? or the one in @appstore/cops/share/cops/config_local.php ?

after moving database from @appstore/cops/share/cops/calibre_database to /var/services/web/cops/calibre_database => checkconfig.php is now working correctly.

why is the cops directory duplicated ?

but http://192.168.1.50/cops/ displays a blank page

Last edited by iostrym; 03-07-2017 at 05:59 PM.
iostrym is offline   Reply With Quote
Reply

Tags
calibre opds, dns, kobo aura, synology


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre OPDS server with windows apps? nickdma Related Tools 10 03-03-2024 02:53 PM
[Old Thread] Android FBreader and Calibre OPDS server question kalex Calibre 5 12-24-2015 10:16 PM
PHP+Apache web server for calibre ... chaley Related Tools 254 04-28-2014 08:18 PM
External OPDS catalogue in Calibre bolton Calibre 1 09-05-2012 06:14 AM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM


All times are GMT -4. The time now is 02:02 AM.


MobileRead.com is a privately owned, operated and funded community.