Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-04-2013, 06:04 AM   #406
everaejo
Junior Member
everaejo began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Ipad
Message posted twice

Last edited by everaejo; 05-04-2013 at 06:31 AM.
everaejo is offline   Reply With Quote
Old 05-04-2013, 06:28 AM   #407
everaejo
Junior Member
everaejo began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Ipad
Quote:
Originally Posted by mariosipad View Post
@everaejo

First a few questions:

What version number of COPS did you install?

In the file config_local.php that you copied from config_local.php.example or config_default.php did you change anything other than the line
Code:
    $config['calibre_directory'] = './calibre/';
where ./caliber/ point to your calibre directory on your QNAP?

Are the files readable for all users (-rw-r--r--)? (change with chmod)

Did you change anything in .htaccess?

Can you ssh (using putty) into your QNAP?
Quote:
Originally Posted by everaejo View Post
Dear,

I managed to install COPS on a QNAP419 (QNap : latest firmware).
Surfing to the COPS PHP site works, and connecting to the OPDS catalog works also.

The only thing that doesn't work is a book download (:
On an Ipad with the Shubook app, I receive a message 'server error'.
When downloading in Firefox on Windows , the system creates a file with 0 bytes.
When accessing the library through the original calibre program, everything works fine, so I think the database is ok.

I suspect it is an access right problem, but I tried everything I could find in forums, and cannot get it working.

The Calibre library is in a separate directory. Checkconfig.php generates no errors.

Could someone please help me ? TX !

Joris
Sir,

Thanks for the quick response. I have no experience with Linux so this is a painstaking excersise for me

COPS-version : 0.3.4.
Config_Local : I added a reference to an location outside the website directory.

<?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'] = '/share/Gezin/CalLib/';
$config['calibre_internal_directory'] = '/share/Gezin/CalLib/';
$config['cops_x_accel_redirect'] = "X-Sendfile";

/*
* Catalog's title
*/
$config['cops_title_default'] = "thuis";

/*
* 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";
?>

where ./caliber/ point to your calibre directory on your QNAP : I'm sorry, but I don't understand the question.

Rights on Calibre folder : I added rights during troubleshooting phase, just to make sure ...


[/share/Web/calibre] # ls -ls
8 -rwxrwx-w- 1 admin administ 6850 Mar 27 20:13 CHANGELOG*
20 -rwxrwx-w- 1 admin administ 17992 Mar 5 08:22 COPYING*
4 -rwxrwx-w- 1 admin administ 1212 Mar 26 20:09 LICENSE_php-epub-meta*
12 -rwxrwx-w- 1 admin administ 11734 Mar 23 08:34 OPDS_renderer.php*
4 -rwxrwx-w- 1 admin administ 2920 Mar 5 08:22 README*
4 -rwxrwx-w- 1 admin administ 167 Mar 5 08:22 README.md*
4 -rwxrwx-w- 1 admin administ 1136 Mar 6 07:18 about.xml*
4 -rwxrwx-w- 1 admin administ 4049 Mar 5 08:22 author.php*
20 -rwxrwx-w- 1 admin administ 18933 Mar 26 21:52 base.php*
20 -rwxrwx-w- 1 admin administ 17372 Mar 26 20:10 book.php*
4 -rwxrwx-w- 1 admin administ 3573 Mar 14 16:26 bookdetail.php*
8 -rwxrwx-w- 1 admin administ 4681 Mar 12 09:59 checkconfig.php*
4 -rwxrwx-w- 1 admin administ 300 Mar 5 08:22 config.php*
8 -rwxrwx-w- 1 admin administ 4771 Mar 26 21:53 config_default.php*
4 -rwxrwx--- 1 admin administ 726 May 3 15:37 config_local.php*
4 -rwxrwx-w- 1 admin administ 570 Mar 5 08:22 config_local.php.example*
4 -rwxrwx-w- 1 admin administ 3628 Mar 27 19:46 customcolumn.php*
8 -rwxrwx-w- 1 admin administ 4541 Mar 5 08:22 data.php*
20 -rwxrwx-w- 1 admin administ 20014 Mar 26 20:09 epub.php*
8 drwxrwxrwx 3 admin administ 4096 May 2 16:58 fancybox/
16 -rwxrwx-w- 1 admin administ 12862 Mar 5 08:22 favicon.ico*
4 -rwxrwx-w- 1 admin administ 1082 Mar 5 08:22 feed.php*
4 -rwxrwx-w- 1 admin administ 3808 Mar 5 08:22 fetch.php*
8 drwxrwxrwx 2 admin administ 4096 May 2 16:58 images/
16 -rwxrwx-w- 1 admin administ 12305 Mar 8 08:43 index.php*
8 drwxrwxrwx 2 admin administ 4096 May 2 16:58 js/
8 drwxrwxrwx 2 admin administ 4096 May 2 16:58 lang/
4 -rwxrwx-w- 1 admin administ 2484 Mar 5 08:22 serie.php*
4 -rwxrwx-w- 1 admin administ 2839 Mar 6 07:18 style.css*
4 -rwxrwx-w- 1 admin administ 1997 Mar 5 08:22 tag.php*
32 -rwxrwx-w- 1 admin administ 29895 Mar 26 20:09 tbszip.php*
8 drwxrwxrwx 2 admin administ 4096 May 2 16:58 tools/

Rights on book files : Just to make sure, I recreated the metadata.db file with a small sample of books.

[/share/Gezin/CalLib] # ls -l
drwxrwxrwx 3 admin administ 4096 May 3 22:07 Berry, Steve/
drwxrwxrwx 3 admin administ 4096 May 3 21:59 D. Hewson/
drwxrwxrwx 3 admin administ 4096 May 3 22:26 Glenn Thrush/
drwxrwxrwx 35 admin administ 4096 May 3 22:25 Rene Goscinny/
drwxrwxrwx 3 admin administ 4096 May 3 22:03 S. Berry/
drwxrwxrwx 10 admin administ 4096 May 3 22:05 Steve Berry/
-rwxrwx--- 1 admin administ 192512 May 3 23:05 metadata.db*
-rwxrwx--- 1 admin administ 13042 May 3 22:28 metadata_db_prefs_backup.json*
[/share/Gezin/CalLib] #

.htaccess : I created an .htaccess file in the /share/Gezin/CalLib folder, but I deleted it.
In the apache.conf file, I added the /share/Gezin/CalLib in a < directory>statement, giving access to all.

Putty : I can access the NAS over Putty from SSH.

Once again : thanks.

Joris
everaejo is offline   Reply With Quote
 
Advertisement
Old 05-04-2013, 11:31 AM   #408
mariosipad
Groupie
mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'
 
Posts: 177
Karma: 10372
Join Date: Nov 2012
Device: iPad & iPhone with Marvin
@jeremydouglass

Your solution:
1. make a copy (cp -p -R) of the cops web directory for each library
2. edit each config file to point at a different data directory

will work just fine.

To answer your questions:
- Is there a better way of doing this?

Yes, wait for the next version of COPS with multiple libraries. It's on the way, but in the meantime use your own solution.

- Are there any complications to watch out for?

Not as far as I know. It worked for me.

- Will having many cops directories (e.g. 5-10) have any performance impact, or is it simple PHP (e.g. no per-site daemons or things like that).

It will only have a performance impact if you are using all those libraries at the same time. The only time I saw heavy processor use up to 100% is when COPS (actually the Apache webserver) had to generate the covers to display on your screen. There are no daemons involved.

Enjoy COPS!
mariosipad is offline   Reply With Quote
Old 05-04-2013, 11:58 AM   #409
mariosipad
Groupie
mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'
 
Posts: 177
Karma: 10372
Join Date: Nov 2012
Device: iPad & iPhone with Marvin
@everaejo

Ok. First change config_local.php so that it looks like this (or change back some changes you made):


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 /
*/
$config['calibre_directory'] = '/share/Gezin/CalLib/';

/*
 * made 2 changes:
 * no need for internal directory
 * no need for x-sendfile (is X-sendfile installed on your QNAP?
 * if not, I might explain your problems.
 */
$config['calibre_internal_directory'] = '';
$config['cops_x_accel_redirect'] = "";

/*
* Catalog's title
* there can never ba a problem with "at home" ;-)
*/
$config['cops_title_default'] = "thuis";

/*
* 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";
?>
Just leave all the other settings in their default state.

Then:
.htaccess : I created an .htaccess file in the /share/Gezin/CalLib folder, but I deleted it.

There already is a .htaccess file in the COPS directory. Leave as is for now.


In the apache.conf file, I added the /share/Gezin/CalLib in a < directory>statement, giving access to all.

Should not be necessary (I never needed it to make COPS work).

If
http://<ip-of-your-QNAP>/calibre/checkconfig.php
gives no errors, it should work!

Enjoy COPS

NB: If you use an iPad consider using Marvin as an e-book reader, its great!
mariosipad is offline   Reply With Quote
Old 05-05-2013, 04:38 PM   #410
vlad59
Addict
vlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five words
 
Posts: 353
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
@everaejo

As Mario already said, you only should change the default value of $config['cops_x_accel_redirect'] if you're sure that your webserver can use it. I don't know if X-SendFile is enabled on Qnap so please remove this line from your config-local.php and it should work fine.

$config['calibre_internal_directory'] should only be set if you're using Nginx as a webserver.

@jeremydouglass

Next version of COPS will enable multiple database, try to wait a few days and it should be easier for you to use.

About the performance issues, there is really no problem here, I have 4 COPS running on my server without any issue.
vlad59 is offline   Reply With Quote
Old 05-06-2013, 09:09 AM   #411
everaejo
Junior Member
everaejo began at the beginning.
 
Posts: 6
Karma: 10
Join Date: May 2013
Device: Ipad
@vlad59, mariosipad

Dear Sirs,

Everything works fine now. I can download files. I thank you very much.
Do you have a Paypal donation account or an Amazon list to express my appreciation in a more substantial way ?

Joris
everaejo is offline   Reply With Quote
Old 05-07-2013, 03:47 PM   #412
vlad59
Addict
vlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five words
 
Posts: 353
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
COPS 0.4.0

COPS 0.4.0 is out with new features and some fixed bugs (First post to download) :

* Add multiple database support. Check the documentation of $config['calibre_directory'] in config-default.php to see how to enable it.
* Include jquery library in COPS's repository to be sure that COPS will work on LAN (without Internet access).
* Prepare the switch to HTML5. Thanks to Thomas Severinsen for most of the code.
* Update the locale strings to be more strict with plurals. Thanks to Tobias Ausländer for the code.
* If Fancybox is not enabled ($config['cops_use_fancyapps'] = "0") then it's not used at all (even in the about box).
* Fix book comments if it contains UTF8 characters. Reported by Alain.
* Link to the book permalink was not working correctly in some cases. Reported by celta.
* Moved some external resources to a resources directory.
* Add chinese translation. Thanks to wogong for the pull request.

The most important change is the support of multiple database (it was requested by several people here). You can enable it by changing your config_local.php like that :
Code:
$config['calibre_directory'] = array (
    "My database name" => "/home/directory/calibre1/", 
    "My other database name" => "/home/directory/calibre2/");
Both OPDS and HTML catalog should work as usual. Note that if you start a search in index page (where you see all the databases) it will be done on all databases.

There was a lot of contributed code in this release, thanks a lot to all the contributors and the beta testers.

For the next version, my main goal is to add a way to send mail through COPS to allow a better integration with Kindle.

I'll push the Synology package soon.

As usual the download link is in the first post.

Happy testing.
vlad59 is offline   Reply With Quote
Old 05-07-2013, 04:58 PM   #413
maxjens
Connoisseur
maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.maxjens ought to be getting tired of karma fortunes by now.
 
maxjens's Avatar
 
Posts: 88
Karma: 490410
Join Date: Jul 2010
Device: iPad & Bebook Neo
@vlad59 Thanks for the multiple libraries. Was one of the features I requested. The way you implemented it is very well done.

The combination of Calibre for ebook management, Cops for distribution and Marvin as ebook read is a perfect set. Thanks.
maxjens is offline   Reply With Quote
Old 05-07-2013, 05:56 PM   #414
mariosipad
Groupie
mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'mariosipad knows the difference between 'who' and 'whom'
 
Posts: 177
Karma: 10372
Join Date: Nov 2012
Device: iPad & iPhone with Marvin
For those with an iPad and who use Marvin as e-reader and who want to use the new OPDS search feature of Marvin, you need to set:
Code:
$config['cops_full_url'] ='';
to
$config['cops_full_url'] = 'http://<IP_of_your_COPS_server>/COPS_directory/';

Example (LAN):
$config['cops_full_url'] = 'http://192.168.0.123/cops040/';
The search feature of Marvin works with the new multiple databases of COPS!

for COPS
mariosipad is offline   Reply With Quote
Old 05-13-2013, 08:19 PM   #415
micster
Enthusiast
micster began at the beginning.
 
Posts: 37
Karma: 10
Join Date: May 2012
Device: none
Custom Columns?

Could someone please explain to me how I use the custom columns? I would appreciate step by step instructions for Calibre and the COPS config file. I can't seem to get this to work and I think I'm having trouble understanding what is meant by this part:

Quote:
Note that for now only the first, second and fourth type of custom columns are supported
Where do these custom columns show up within COPS? Is it on the bookdetail page? I want to display the e-books number of pages and the file size.

Thanks for the help!
micster is offline   Reply With Quote
Old 05-14-2013, 03:44 AM   #416
vlad59
Addict
vlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five words
 
Posts: 353
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by micster View Post
Could someone please explain to me how I use the custom columns? I would appreciate step by step instructions for Calibre and the COPS config file. I can't seem to get this to work and I think I'm having trouble understanding what is meant by this part:



Where do these custom columns show up within COPS? Is it on the bookdetail page? I want to display the e-books number of pages and the file size.

Thanks for the help!
So far I've only added support for custom columns that works like catagories (like tags or series). They are shown in the main menu (beside authors, tags, series).

Support for other type of custom columns (like number of pages, file size, etc) will come. I just don't know when I'll have time to add that (patch welcome if you know PHP).
vlad59 is offline   Reply With Quote
Old 05-14-2013, 04:31 PM   #417
micster
Enthusiast
micster began at the beginning.
 
Posts: 37
Karma: 10
Join Date: May 2012
Device: none
Thanks for the clarification, Vlad59. As always I appreciate the work that has been done and keep up the good work!
micster is offline   Reply With Quote
Old 05-15-2013, 02:31 PM   #418
micster
Enthusiast
micster began at the beginning.
 
Posts: 37
Karma: 10
Join Date: May 2012
Device: none
More Icons Please

I recently added multiple databases by modifying the "calibre_directory" parameter in the config. I added a new database for novels, comics and magazines which works out well for me.

So now when I go to my library either through HTML with a browser or OPDS with an ereader, the first thing I see is this list of my databases. Is it possible to add images to this list? Right now it looks a little boring to me and I would like to spice it up with a few icons for each category similar to the "cops_show_icons" parameter.
micster is offline   Reply With Quote
Old 05-16-2013, 12:35 PM   #419
vlad59
Addict
vlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five words
 
Posts: 353
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
@mcister

Added on github (https://github.com/seblucas/cops/issues/65). Don't know when I'll do it though .
vlad59 is offline   Reply With Quote
Old 05-17-2013, 01:02 PM   #420
electronicfur
Enthusiast
electronicfur is on a distinguished road
 
Posts: 26
Karma: 50
Join Date: Aug 2011
Device: Samsung Note FBReader, N900 FBReader, Nook Simple Touch (Kindle3 died)
Runs fine on my low powered Dockstar NAS with only 128MB of memory running Debian.

One thing that would be good is an option to not display book images in lists, or cache the images somehow after the resizing; resizing is the biggest performance issue on my small NAS.

Also I noticed that the Tags and Series pages dont respect the cops_max_item_per_page setting. With over 9000 tags this caused JFBReader to crash on my phone.

But a great app, means I can stop running calibre2opds.
electronicfur is offline   Reply With Quote
Reply

Tags
calibre opds, kobo aura, synology

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


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


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