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 11-20-2011, 07:03 AM   #151
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thanks. Both sets of changes will be in the next release.
chaley is offline   Reply With Quote
Old 11-21-2011, 10:52 AM   #152
edent
Enthusiast
edent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameteredent can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
edent's Avatar
 
Posts: 48
Karma: 12654
Join Date: Dec 2009
Location: UK
Device: Likebook Ares, Kindle 3G, Nook STR, 511eb
Oh, two other things.
The meta language declaration is deprecated.
http://www.w3.org/TR/2011/WD-html-ma...-language.html

Should just use
Code:
<html lang="en">
There's an exta /span on
Code:
<span style="font-size:large">{{$page_title}}<br></span><span style="font-size:medium">{{$title}}</span></span>

Last edited by edent; 11-21-2011 at 10:59 AM.
edent is offline   Reply With Quote
Old 11-22-2011, 05:18 AM   #153
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Changes made ...
chaley is offline   Reply With Quote
Old 11-22-2011, 10:25 AM   #154
ruaware
Junior Member
ruaware began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2011
Device: Kindle
I can not get this to work

I have binded the directory to 8060 port so they will goto webaddress and not need a directory. but have also tried adding the folder to an existing settings.

Download latest smarty and placed in /SmartyRelease/libs

I have edit config.local as follows and i just get a blank page. please help
$config['library_dir'] = 'C:\\Users\\jamie\\Calibre Library';
$config['web_dir'] = '/';
$config['smarty_web_dir'] = $config['web_dir'] . '/smarty';
$config['smarty_dir'] = 'C:\Moodle\smartyTemp';
$config['smarty'] = '/SmartyRelease/libs';

edit: forgot to say i have IIS 7.5 and PHP 5.??

Last edited by ruaware; 11-22-2011 at 10:31 AM.
ruaware is offline   Reply With Quote
Old 11-22-2011, 11:29 AM   #155
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ruaware View Post
I can not get this to work

I have binded the directory to 8060 port so they will goto webaddress and not need a directory. but have also tried adding the folder to an existing settings.

Download latest smarty and placed in /SmartyRelease/libs

I have edit config.local as follows and i just get a blank page. please help
$config['library_dir'] = 'C:\\Users\\jamie\\Calibre Library';
$config['web_dir'] = '/';
$config['smarty_web_dir'] = $config['web_dir'] . '/smarty';
$config['smarty_dir'] = 'C:\Moodle\smartyTemp';
$config['smarty'] = '/SmartyRelease/libs';

edit: forgot to say i have IIS 7.5 and PHP 5.??
Sorry, but I know nothing about IIS, so I can't give much help. That said, there are some things to look at.
  • You say the "latest smarty". The server runs with smarty 2.6. I have no idea if it runs with smarty 3.
  • The server has been tested with PHP 5.2 and PHP 5.3. You should verify that you have one of those.
  • Be sure to run PHP as a module and not in CGI mode (assuming IIS can make that distinction).
  • Given that you are using IIS, you might want to change all the '/' characters to '\\'.
  • the values for config web_dir, smarty_dir, and smarty must be real file paths, probably including a drive letter as you are running on IIS. They are specifically *not* URL paths.
  • I don't know what "binded the directory to port 8060" means, so I can't say if doing so overrides any of the above comments.
chaley is offline   Reply With Quote
Old 11-29-2011, 09:02 AM   #156
nobo
Junior Member
nobo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2011
Device: kindle 2011
Had some Issues with filetype

Hey there,

thank you very much for the lightweight script.
I was figgling around to get it to work yesterday - ending up installing the calibre content server, to just find out it is too much of a resource hog to have it running all the time, for simply just idling around.

The problem was, that I could not download any files. Figured out, that it actually did not properly look for the file extensions - patched the version 2.7 to now run smoothly for me.

Additionally I changed the behavior for serving images to write the thumbnails to a cache and serve them directly to the client. (Does speed up load times for me)

If you are interrested in patches , please let me know.

Another question: Do you think it easily possible to create an opds catalog in the php script aswell? Would really enhance the experience (maybe for stanza?)
nobo is offline   Reply With Quote
Old 11-29-2011, 09:14 AM   #157
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by nobo View Post
Another question: Do you think it easily possible to create an opds catalog in the php script aswell? Would really enhance the experience (maybe for stanza?)
If you mean a static OPDS catalog that can be stored on a web server, then you can use the Calibre2Opds product to do this.
itimpi is offline   Reply With Quote
Old 11-29-2011, 09:40 AM   #158
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nobo View Post
The problem was, that I could not download any files. Figured out, that it actually did not properly look for the file extensions - patched the version 2.7 to now run smoothly for me.

Additionally I changed the behavior for serving images to write the thumbnails to a cache and serve them directly to the client. (Does speed up load times for me)

If you are interrested in patches , please let me know.
Sure, I will look at patches.

I and others don't have problems downloading books, so I don't know what you mean when you say 'did not properly look at extensions'. I suppose that the patch will tell me.

As for caching thumbnails, I did it and than yanked it out. I found that invalidating the cache (checking mod times on the thumbnail against the cache) cost almost as much as serving the image directly (at least on my servers), and the cache increased both complexity and memory usage. However, it seems to work for you, which is good.
Quote:
Another question: Do you think it easily possible to create an opds catalog in the php script aswell? Would really enhance the experience (maybe for stanza?)
It is certainly possible, but I have no need for it and therefore no interest in doing the work. As itimpi says, you can get most of the benefit of OPDS with calibre2opds. Running it at some frequency would keep the catalog mostly up-to-date.
chaley is offline   Reply With Quote
Old 11-29-2011, 12:10 PM   #159
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Curious, does the PHP script have search functionality? For me, that's probably the biggest draw of the native calibre content server.
ilovejedd is offline   Reply With Quote
Old 11-29-2011, 12:16 PM   #160
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ilovejedd View Post
Curious, does the PHP script have search functionality? For me, that's probably the biggest draw of the native calibre content server.
Yes it does. You can try it at the demo site: http://charles.the-haleys.org/calibre/demo.

However, the native server also has search. The search box is at the right near the top (see the attachment), and supports (I think) all of calibre's search expressions. Are you looking for something else?
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	550
Size:	73.2 KB
ID:	79462  
chaley is offline   Reply With Quote
Old 11-29-2011, 01:18 PM   #161
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by chaley View Post
Yes it does. You can try it at the demo site: http://charles.the-haleys.org/calibre/demo.

However, the native server also has search. The search box is at the right near the top (see the attachment), and supports (I think) all of calibre's search expressions. Are you looking for something else?
Cool. I know the native server has search. That's one of the reasons I use it instead of calibre2opds. I reckon adding templates for an OPDS feed shouldn't be so difficult so I can do that myself.

Last edited by ilovejedd; 11-29-2011 at 01:21 PM.
ilovejedd is offline   Reply With Quote
Old 11-29-2011, 06:11 PM   #162
nobo
Junior Member
nobo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2011
Device: kindle 2011
Quote:
Originally Posted by chaley View Post
Sure, I will look at patches.

I and others don't have problems downloading books, so I don't know what you mean when you say 'did not properly look at extensions'. I suppose that the patch will tell me.
Will prepare it, testing a bit more these days. I am using lighttpd and had to use mod_rewrite in order to translate the links back to query strings.

The String $fmt usually has the whole file name in my request (i.e. somebookname.epub). Instead of using epub as the format, the script used the whole bookname including extension to query the database and did not find the required file (hence whitespaces etc have been replaced with '_')

That's the issue I had on my server. I was testing your Demo and it works without problems over there

Quote:
Originally Posted by chaley View Post
As for caching thumbnails, I did it and than yanked it out. I found that invalidating the cache (checking mod times on the thumbnail against the cache) cost almost as much as serving the image directly (at least on my servers), and the cache increased both complexity and memory usage. However, it seems to work for you, which is good.
It is rather a simple hack to save the image file directly to a directory in the webdirectory of the server. Right now I do not care about changed thumbnails, but adding some change-detection logic does add up to the difficulties that will be experienced.

I am running the script on a plugcomputer with a lowvoltage arm cpu. It does ages to convert the images. Even though there are about 8 php-cgi proccesses spawned, handling all the image requests is a lot for the small server. So by just serving the already converted images through the http server, it does enhance the speed and usability a lot. ;-)

Quote:
Originally Posted by chaley View Post
It is certainly possible, but I have no need for it and therefore no interest in doing the work. As itimpi says, you can get most of the benefit of OPDS with calibre2opds. Running it at some frequency would keep the catalog mostly up-to-date.
I know that there is calibre2opds, yet I am not a fan on running very intense scripts every X hours on that small box. And it adds another problem, I would need to server the books library directly over the http server instead of keeping it somewhere else on my server.
And last but not least, I would loose the search capabilities that your script / calibre does provide.

I am not too familiar with smarty (yet), but if there are some more people that would contribute, we can try to enhance your script to even server a valid opds catalog and thus provide an even more convenient alternative to the resource intensive calibre-server. (There might be a couple of more people out there running a NAS box with an arm cpu that would actually love to use this? )
nobo is offline   Reply With Quote
Old 11-30-2011, 12:15 AM   #163
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by nobo View Post
I am not too familiar with smarty (yet), but if there are some more people that would contribute, we can try to enhance your script to even server a valid opds catalog and thus provide an even more convenient alternative to the resource intensive calibre-server. (There might be a couple of more people out there running a NAS box with an arm cpu that would actually love to use this? )
I did a quick perusal of the scripts earlier. Really, pretty much the only thing that needs to be changed are the smarty templates. Perhaps the index.php file, too, although from my initial review, it doesn't appear as if that's needed.
ilovejedd is offline   Reply With Quote
Old 12-01-2011, 04:48 AM   #164
ogarcia
Junior Member
ogarcia began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Dec 2011
Device: Android
Some bugs

Hello.

I'm using calibre php server and i see some bugs in error log:

Code:
PHP Notice:  Undefined index: page in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 79
PHP Notice:  Trying to get property of non-object in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 79
PHP Notice:  Undefined index: use_back in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 130
PHP Notice:  Trying to get property of non-object in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 130
PHP Notice:  Undefined index: up_url in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 132
PHP Notice:  Trying to get property of non-object in /tmp/smarty_templates_c/2a71e5f90020f71cbe2b81a3ee8a7666420dac97.file.header.tpl.php on line 132" while reading response header from upstream, client: 91.116.141.14, server: my.host, request: "POST /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "my.host", referrer: "http://my.host/
I think that this is some parts of template that is not defined in books metas. This can not be treated with "if" sentences?

Greetings!

More info: The smarty-libs are the latest version: 3.1.5

Last edited by ogarcia; 12-01-2011 at 04:52 AM. Reason: Added version of smarty-libs
ogarcia is offline   Reply With Quote
Old 12-01-2011, 05:25 AM   #165
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ogarcia View Post
Hello.

I'm using calibre php server and i see some bugs in error log:
[...]
I think that this is some parts of template that is not defined in books metas. This can not be treated with "if" sentences?

Greetings!

More info: The smarty-libs are the latest version: 3.1.5
I have no idea if smarty V3 works properly with this server. Given the problems you are having, it doesn't. Also, it appears that you are using fastcgi instead of loaded modules, another thing that I haven't tested. Finally, there is not one smarty error in 30 days of apache error logs on my server.

If I were you, I would start with downgrading smarty to V2 and see if the errors go away. I would also switch to loaded modules, unless there is some overriding reason you want to use fastcgi.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM
Web Content Server mezme Calibre 7 01-08-2010 09:59 PM
Calibre web server on MAC I cant get to work.. any help appreciated. stustaff Calibre 5 01-06-2010 06:05 PM
Calibre - web server problems eclpmb Calibre 9 11-28-2008 02:04 PM


All times are GMT -4. The time now is 04:20 PM.


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