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 09-06-2012, 03:09 AM   #106
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by doncaruana View Post
Did you get around to looking at this? I've had no response from the Moon+ developer...
I committed a very very ugly fix to github but with that fix COPS's OPDS feed is not valid anymore. So I'll have to find a more correct way. I'm still not sure that the problem relies in COPS, it may come from the readers.

I opened an issue on FBReaderJ Github and tried to look at the code but it's very complex and I won't have any time to debug.

So long story short : get latest Github it will fix your problem but it so ugly, it won't stay that way.
vlad59 is offline   Reply With Quote
Old 09-07-2012, 09:22 AM   #107
Northguy
Member
Northguy began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2011
Device: Sony PRS-T1
Quote:
Originally Posted by vlad59 View Post
Doest this mean that you've found something to allow the PRS-T1 to use COPS (and fancyapps) or was it about your edition ?
Thanks for asking

No, it means that at the time I wrote that reply I was so confused that I did not trust the info in my post and decided that to delete it altogether

Facts:
  • I got COPS working on a Synology DS212+ NAS with a test library residing in my webroot folder.
  • Synology is running Apache
  • The html page works on my PRS-T1 and I am able to download with the PRS-T1 from the test library

Settings to get this working:

In "config_local.php"
Code:
$config['calibre_directory'] = './test2/';
$config['calibre_internal_directory'] = './test2/';
$config['cops_x_accel_redirect'] = "location";
$config['cops_use_url_rewriting'] = "0";
Changed last line in in fetch.php
Code:
// header ($config['cops_x_accel_redirect'] . ": " . $config['calibre_internal_directory'] . $file);

readfile($config['calibre_internal_directory'] . $file);
With this working I started with getting COPS functional with my large database that resides in /volume1/Documents/Calibre_Library/

I made an alias to that path in httpd-user.conf and somehow managed to download .epubs on my home PC. When downloading with my PRS-T1 I ended up downloading only 'fetch.php'. By the that time I changed so many things that I did not know what I was doing anymore.

Will make a new effort in figuring out how to access files that do not reside in webroot after a few weeks. Next weeks I am inavailable. Unless someone else figures it out before me In that case I just follow his nice little howto

I tried figuring out the fancyapps, but did not succeed completely. With smaller sized cover images the fancybox works ok, so maybe we need to resize the image somehow before opening the fancybox. Need to figure that if that's possible in the code, but php is not my strongest point.
Northguy is offline   Reply With Quote
 
Enthusiast
Old 09-07-2012, 07:31 PM   #108
jillmess
Enthusiast
jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.jillmess ought to be getting tired of karma fortunes by now.
 
jillmess's Avatar
 
Posts: 33
Karma: 481094
Join Date: Dec 2011
Device: Galaxy Tab 7.7
Quote:
Originally Posted by Northguy View Post
I made an alias to that path in httpd-user.conf and somehow managed to download .epubs on my home PC. When downloading with my PRS-T1 I ended up downloading only 'fetch.php'.
I had the same problem with my galaxy tab 7.7. I ended up mounting the folder containing my library (which is in my dropbox folder on the other drive on my readynas) as a folder inside webroot. A symlink didn't work - had to be a mount. There are probably more elegant/correct ways to do this, but this works for me without needing to make any changes to other files.

Jill
jillmess is offline   Reply With Quote
Old 09-11-2012, 02:50 PM   #109
doctur
Junior Member
doctur began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2012
Device: ipad
DB outside webroot

Hey Guys,

Any news about how I can have the DB outside the Webroot? I have all my ebooks on the NAS and I have mapped it to a drive in the Windows server. The main issue is that the software is not able to read outside webroot...

My original comment is the last comment on the previous page...

Thanks!

Last edited by doctur; 09-11-2012 at 02:51 PM. Reason: Added loc for original comment for full history of the issue I am facing.
doctur is offline   Reply With Quote
Old 09-12-2012, 03:48 AM   #110
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Hi,

I can't really help with Apache configuration. With NGinx, it's handled with X-Accel-Redirect. I know Apache can use x-sendfile but I don't know how to use it and don't ever want to go back to Apache to find out.

Let's hope someone else can help with that.
vlad59 is offline   Reply With Quote
Old 09-14-2012, 10:33 AM   #111
CBebop
Junior Member
CBebop began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2012
Device: Kindle
Quote:
Originally Posted by doctur View Post
Hey Guys,

Any news about how I can have the DB outside the Webroot? I have all my ebooks on the NAS and I have mapped it to a drive in the Windows server. The main issue is that the software is not able to read outside webroot...

My original comment is the last comment on the previous page...

Thanks!
Give this a try, it will "Mount" the directory you want inside your webroot and it works for things like vsftpd which also doesn't follow symlinks.

Code:
mount --bind /dir/where/files/are /webroot/directory
And to make it persist on reboots if it works for you, you can add something like this to your FSTAB:

Code:
/dir/where/files/are /webroot/directory none rw,bind 0 0
Side Note: Been using it on my VPS in conjunction with dropbox to feed books to my 3G enabled Kindle. Works pretty darn well, though there are some silly issues with the Kindle browsers being funky sometimes. Nothing that really bothers me though. I ended up getting annoyed with lighttpd and just setup nginx and it works like a charm.

Last edited by CBebop; 09-14-2012 at 10:39 AM. Reason: Correcting code a little | Side notes
CBebop is offline   Reply With Quote
Old 09-14-2012, 10:50 AM   #112
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by CBebop View Post
...
I ended up getting annoyed with lighttpd and just setup nginx and it works like a charm.
Music to my ears
vlad59 is offline   Reply With Quote
Old 09-14-2012, 09:54 PM   #113
Stampercam
Connoisseur
Stampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to behold
 
Stampercam's Avatar
 
Posts: 82
Karma: 19674
Join Date: Jan 2011
Device: ipad, MiGear
I have COPS running on synology NAS, and it works fine for some searches but seems to hang on a larger list. A tag list with 450 titles is producing an error.


When searching via safari on my ipad, I get
This page contains the following error:
error on line 7 at column 20: xmlParseEntityRef: no name
Below is a rendering of the page up to the first error.

There is nothing below that...

Any suggestions?

Last edited by Stampercam; 09-14-2012 at 10:00 PM.
Stampercam is offline   Reply With Quote
Old 09-15-2012, 03:51 AM   #114
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Can you please try to find some log to give me some clues ?

To be sure to understand what you did : you just :
* click on the tag menu
* Click on a tag with a lot of title
* The error comes right away

Am I right ?

If that's right it would be great if you could send me by email your calibre database (just the file calibre.db) zipped by mail. I should be able to reproduce it.

Thanks in advance.

Last edited by vlad59; 09-15-2012 at 03:59 AM.
vlad59 is offline   Reply With Quote
Old 09-15-2012, 05:39 AM   #115
Stampercam
Connoisseur
Stampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to beholdStampercam is a splendid one to behold
 
Stampercam's Avatar
 
Posts: 82
Karma: 19674
Join Date: Jan 2011
Device: ipad, MiGear
Yes, that is what I did, although there is a pause before the error.

I can't find a file called calibre.db, but there is a metadata.db. Is that what you need?
Stampercam is offline   Reply With Quote
Old 09-15-2012, 08:34 AM   #116
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by Stampercam View Post
Yes, that is what I did, although there is a pause before the error.

I can't find a file called calibre.db, but there is a metadata.db. Is that what you need?
Yep silly me
That's the file I need to debug. You'll find my email on COPS website or you can send me a PM with a location where I can download it.

Thanks.
vlad59 is offline   Reply With Quote
Old 09-16-2012, 09:01 AM   #117
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
COPS 0.2.1 is out with the following changes (First post to download) :

* Fix one last error (hopefully) in link generation (thanks to gaspine)
* Add Sony PRS-T1 to the list of E-Ink device (thanks to Northguy)
* Fix another HTML special characters problem (thanks to NeilBryant)
* Add an ugly config parameter to allow search in non-compliant OPDS reader (thanks to Don Caruana and David Lee)

So only bug fixes and an ugly fix to allow opensearch to work with non compliant OPDS client.

As usual the download link is in the first post.

Please try to use Github (https://github.com/seblucas/cops) to create issue or even better merge request (thanks to Northguy for being the first).

I also opened the Wiki on Github but will have no time to write in it (not until november at least), so feel free to try to document on the Wiki everything you found (or copy all the very good information in this topic). I'll review every article.

Happy testing.
vlad59 is offline   Reply With Quote
Old 09-20-2012, 10:40 PM   #118
trogdan
Junior Member
trogdan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2012
Device: Android
Trying to place COPS in a subfolder

So, I am new to nginx and PHP. I'm trying to place COPS in a subdirectory. So for example, instead of

http://hostname/index.php

I would like to have

http://hostname/opds/index.php

Anyone have suggestions to change my configuration to allow this? If i just change the root , the php doesn't get executed, it's merely downloaded by the client.

Code:
server {

    	listen [::]:443;
	server_name www.domain.com;
    	
	ssl on;
	ssl_certificate /etc/nginx/conf.d/server.crt;
	ssl_certificate_key /etc/nginx/conf.d/server.pem;
	ssl_session_timeout 5m;

    	access_log  /var/log/nginx/server.access.log;
    	error_log /var/log/nginx/server.error.log;
    	root   /var/www/opds;
    	
    	location /download/ {
		rewrite ^/download/(\d+)/.*\.(.*)$ /fetch.php?data=$1&type=$2 last;
      		break;
    	}

    	location ~ ^/images.*\.(gif|png|ico|jpg)$ {
		expires 31d;
    	}

    	location ~ .(js|css)$ {
		expires 31d;
    	}
    
    	location ~ .*\.php$ {
		include /etc/nginx/fastcgi_params;
       		fastcgi_param   SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       		fastcgi_pass 127.0.0.1:9000;
    	}

    	location /Calibre {
		root /media/Quadra/Books;
		internal;
    	}	
}
trogdan is offline   Reply With Quote
Old 09-21-2012, 02:55 AM   #119
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: 346
Karma: 37761
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
You shouldn't have to change anything for the catalog to display.

You may have to change the URL rewriting rule for /download/ but that should be all.

I have a working test with a directory at home and everything displays fine.
vlad59 is offline   Reply With Quote
Old 09-21-2012, 10:50 AM   #120
trogdan
Junior Member
trogdan began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Aug 2012
Device: Android
Success!

Thanks Vlad

i just changed the root to /var/www, and changed the rewrite tool to

Code:
rewrite ^/download/(\d+)/.*\.(.*)$ /opds/fetch.php?data=$1&type=$2 last;
and it just worked! I was changing the php location as well, which was probably screwing me up.
trogdan 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 08:18 PM
[Old Thread] Android FBreader and Calibre OPDS server question kalex Calibre 4 12-15-2012 01:50 PM
External OPDS catalogue in Calibre bolton Calibre 1 09-05-2012 06:14 AM
Calibre OPDS server with windows apps? nickdma Related Tools 9 02-02-2011 03:09 PM
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 08:09 PM.


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