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 01-21-2013, 04:20 AM   #256
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
Quote:
Originally Posted by vlad59 View Post
@Kevnancy

To avoid any typo Please try to replace your fetch.php by https://raw.github.com/seblucas/cops/master/fetch.php

And edit your config_local.php to update these 2 config items :

Code:
$config['calibre_internal_directory'] = '';
$config['cops_x_accel_redirect'] = "";
I did that... but always the error 404, with the error in the physical access path:
Code:
	Z:\ServerFolders\Ebook\Calibre Server\Z:\Serverfolders\Ebook\Calibre\Brown,Dan\Anges&demons (1)\Anges&demons - Brown,Dan.epub
My config_local.php:
PHP Code:
<?php
/**
 * COPS (Calibre OPDS PHP Server) class file
 *
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @author     Sébastien Lucas <sebastien@slucas.fr>
 */

    
if (!isset($config))
        
$config = array();
  
    
/*
     * The directory containing calibre's metadata.db file, with sub-directories
     * containing all the formats.
     * If this directory starts with a / EPUB download will only work with Nginx
     * and the calibre_internal_directory has to be set properly
     * BEWARE : it has to end with a /
     */
    
$config['calibre_directory'] = 'Z:/Serverfolders/Ebook/Calibre/';
    
    
/*
     * The internal directory set in nginx config file
     * or the same directory as calibre_directory with X-Sendfile
     */
    
$config['calibre_internal_directory'] = ''

    
/*
     * Full URL prefix (with trailing /)
     * usefull especially for Opensearch where a full URL is sometimes required
     * For example Mantano requires it.
     */
    
$config['cops_full_url'] = ''
    
    
/*
     * Number of recent books to show
     */
    
$config['cops_recentbooks_limit'] = '50'
    
    
/*
     * Catalog's title
     */
    
$config['cops_title_default'] = "My library"

    
/*
     * Catalog's subtitle
     */
    
$config['cops_subtitle_default'] = ""
    
    
/*
     * Wich header to use when downloading books outside the web directory
     * Possible values are :
     *   X-Accel-Redirect : For Nginx
     *   X-Sendfile : For Lightttpd or Apache (with mod_xsendfile)
     */
    
$config['cops_x_accel_redirect'] = "";
    
    
/*
     * Height of thumbnail image for OPDS
     */
    
$config['cops_opds_thumbnail_height'] = "70";
    
    
/*
     * Height of thumbnail image for HTML
     */
    
$config['cops_html_thumbnail_height'] = "70";

    
/*
     * Icon for both OPDS and HTML catalog
     * Note that this has to be a real icon (.ico)
     */
    
$config['cops_icon'] = "favicon.ico";

    
/*
     * Show icon for authors, series, tags and books on OPDS feed
     *  1 : enable
     *  0 : disable
     */
    
$config['cops_show_icons'] = "1";
    
    
/*
     * Default timezone 
     * Check following link for other timezones :
     * http://www.php.net/manual/en/timezones.php
     */
    
$config['default_timezone'] = "Europe/Paris";
    
    
/*
     * Prefered format for HTML catalog
     * The two first will be displayed in book entries
     * The other only appear in book detail
     */
    
$config['cops_prefered_format'] = array ("EPUB""PDF""MOBI""CBR""CBZ");
    
    
/*
     * 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";
    
    
/*
     * generate a invalid OPDS stream to allow bad OPDS client to use search
     * Example of non compliant OPDS client : FBReader (was working in May 2012), Moon+ Reader
     * Example of good OPDS client : Mantano
     *  1 : enable support for non compliant OPDS client
     *  0 : always generate valid OPDS code
     */
    
$config['cops_generate_invalid_opds_stream'] = "0"
    
    
/*
     * Max number of items per page
     * -1 unlimited
     */
    
$config['cops_max_item_per_page'] = "-1"

    
/*
     * split authors by first letter
     * 1 : Yes
     * 0 : No
     */
    
$config['cops_author_split_first_letter'] = "1";  
    
    
/*
     * Enable of Fancyapps (for popups)
     * 1 : Yes (enable)
     * 0 : No
     */
    
$config['cops_use_fancyapps'] = "1";  
    
    
/*
     * Update Epub metadata before download
     * 1 : Yes (enable)
     * 0 : No
     */
    
$config['cops_update_epub-metadata'] = "0";  
?>
Kevnancy is offline   Reply With Quote
Old 01-21-2013, 05:17 AM   #257
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: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Can you send me by mail your Calibre database (metadata.db).

Thanks in advance
vlad59 is offline   Reply With Quote
Advert
Old 01-21-2013, 09:13 AM   #258
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
could you give your email by PM?
Kevnancy is offline   Reply With Quote
Old 01-21-2013, 12:44 PM   #259
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
@vlad59: thank you very for your help... it's working ;-)
Kevnancy is offline   Reply With Quote
Old 01-23-2013, 06:52 AM   #260
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
@Vald59: If Calibre server has a username and password, how can I use your server?

with access adress like: login: password@xxxxxxx.com:8080 ?
Kevnancy is offline   Reply With Quote
Advert
Old 01-23-2013, 03:05 PM   #261
micster
Enthusiast
micster began at the beginning.
 
Posts: 39
Karma: 10
Join Date: May 2012
Device: none
Quote:
Originally Posted by vlad59 View Post
Following CreaB (nicinuse) pull request about custom columns, I have made several commits on Github to add them in a hopefully clean/reusable way.

As I never used them, I have a question : what do you use them for ?

CreaB used one custom column to add a genre and you ?

Thanks in advance. It will help to better test the code before releasing it.
I've used custom columns for the "page count" before. This is a little bit of extra information that I would like to include under the book details.

Quote:
Originally Posted by vlad59 View Post
If I understand you correctly then most custom columns are meant to be just added in the book detail. There's little interest to add other filter by custom columns (like author, serie, tag).
Another way I could use a custom column would be for the "type" of ebook. For example I would have: comic, book, magazine, journal and newspaper. This is a similar use as having a "genre", but could be used in conjunction. My comics often have the same genre as some of my books, but I want them to be listed separate.

I'd say I have a moderate level of interest in having this feature.
micster is offline   Reply With Quote
Old 01-23-2013, 03:14 PM   #262
micster
Enthusiast
micster began at the beginning.
 
Posts: 39
Karma: 10
Join Date: May 2012
Device: none
Quote:
Originally Posted by Kevnancy View Post
@Vald59: If Calibre server has a username and password, how can I use your server?

with access adress like: login: password@xxxxxxx.com:8080 ?
I believe COPS is entirely separate from running a Calibre Server. I think the only thing it's using is your giant database file, which has no security.

I don't believe that COPS has any user management, but I could be wrong. I don't really care who "accidentally" has access to my library so it's not a feature I would use.

You could simulate this feature by using an ".htaccess" file. It sounds scary, but it really is not. Do a Google search for password protecting a directory with ".htaccess". I would put that file in your root directory and then anytime someone goes to your COPS Library they would get a popup asking them to login.
micster is offline   Reply With Quote
Old 01-24-2013, 09:01 AM   #263
jj23
Junior Member
jj23 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2013
Device: Kindle Paperwhite
COPS on Synlogy

Hi,

I've got a problem on Synology DS212j. After installing COPS in webroot and pointing web browser to COPS there's an error message:

"You've been redirected because COPS is not configured properly
Database error
Check if GD is properly installed and loaded
OK
Check if Sqlite is properly installed and loaded
OK
Check if Calibre database file exists and is readable
OK
Check if Calibre database file can be opened with PHP
OK"

Are there any logs to find out what is the problem?
jj23 is offline   Reply With Quote
Old 01-24-2013, 09:05 AM   #264
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: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
If everything in checkconfig.php is OK it's really strange that you have problems.

Try to force the page name : index.php.
vlad59 is offline   Reply With Quote
Old 01-24-2013, 01:41 PM   #265
dirgeon
Member
dirgeon began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Jan 2013
Location: Pasig, PHL
Device: Kindle PW
@vlad59 Thanks for this! It's so much snappier to access on the Kindle PW vs the calibre content server's "modern" version (the old and mobile versions seem a bit dated, hehehe).

A couple requests (sorry if these have been requested before):

1. Could you have the search also look in the series titles?

2. Could you make it so we can (optionally?) split the alphabetical/browse pages into e.g. A-E, F-J, K-O, P-T, U-Z ?

Thanks again!
dirgeon is offline   Reply With Quote
Old 01-24-2013, 03:40 PM   #266
jj23
Junior Member
jj23 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2013
Device: Kindle Paperwhite
It's very strange but.. it just started working :-) I've refreshed the site and saw my library! Thank you for support.
jj23 is offline   Reply With Quote
Old 01-26-2013, 10:51 AM   #267
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
Quote:
Originally Posted by micster View Post
You could simulate this feature by using an ".htaccess" file. It sounds scary, but it really is not. Do a Google search for password protecting a directory with ".htaccess". I would put that file in your root directory and then anytime someone goes to your COPS Library they would get a popup asking them to login.
I tried to install an htaccess access but without results. I put an .htaccess and an .htpasswd files in the COPS root directory but when I try to access to my server: xxxxx.homeserver.com:8080, I haven't popup
Kevnancy is offline   Reply With Quote
Old 01-26-2013, 12:57 PM   #268
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: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
.htaccess is for Apache and you're using IIS if I remember correctly.

So maybe someone in the forum can help you or try Google
vlad59 is offline   Reply With Quote
Old 01-27-2013, 03:36 AM   #269
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: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
COPS 0.3.1

COPS 0.3.1 is out with some changes (First post to download) :

* Add Facets to the OPDS catalog (check config item cops_books_filter). So far the only OPDS client that support facets are Mantano Reader and Bluefire
* Fix book sort in some list. Patch provided by Tyler J. Wagner.
* Update .htaccess to check if Xsendfile is available. Thanks to Gaspine for the patch.
* Add basic support of custom columns. Check the following config item : cops_calibre_custom_column
* Usage of X-Accel-Redirect / X-Sendfile is not necessary anymore. Warning all Nginx users who wants to still use X-Accel-Redirect must add $config['cops_x_accel_redirect'] = "X-Accel-Redirect" in their config_local.php
* Fix COPS on IIS / Windows. Reported by Kevnancy.
* Simplified config_default.php
* Add a new config_local.php.example with the minimal configuration item to change.

Not much new stuff but many simplifications of the configuration system.

If you're using OPDS with Mantano or BlueFire you can try to change $config['cops_books_filter'] to enable facets in OPDS catalog (allow filtering like in the feedbooks catalog for example). I personally use this setting to filter Read/Unread book (I add the tag Read to any book I already read) :

array ("All" => "", "Unread" => "!Read", "Read" => "Read")

In the future I'll also enable this in the HTML catalog.

I also added basic custom column support (based on the pull request from CreaB) through $config['cops_calibre_custom_column']. Currently, they are handled like tags. I'll add support for the other type of custom columns later.

If everything goes well I should be able to provide a SPK (Synology package) really soon. If other NAS users (QNap, ReadyNas, ...) want specific package I won't be able to build (I don't own the hardware) but I'll help anyone starting that.

As usual the download link is in the first post.

Happy testing.
vlad59 is offline   Reply With Quote
Old 01-27-2013, 05:04 AM   #270
Kevnancy
Member
Kevnancy began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2013
Device: kobo glo
Quote:
Originally Posted by vlad59 View Post
.htaccess is for Apache and you're using IIS if I remember correctly.

So maybe someone in the forum can help you or try Google
Oups it's true, no issue with .htaccess on IIS...
Kevnancy is offline   Reply With Quote
Reply

Tags
calibre opds, dns, kobo aura, synology

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:33 AM.


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