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 02-15-2012, 03:51 AM   #196
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Release 0.2.8 available

Release 0.2.8 is available at http://charles.the-haleys.org/calibre/

This release fixes various bugs and adds the ability to disable downloading of formats on a per-user basis. For the latter, see the new configuration item 'enable_format_download'.

Please note: in all previous releases, per-user restrictions did not work when also using the server's internal login facility.

Change log:
Spoiler:
88 charles <> 2012-02-15 {REL 0.2.8}
Release 0.2.8

87 charles <> 2012-02-15
Update version number

86 charles <> 2012-02-15
Add the ability to not display format links. Fix a longstanding bug with internal login not respecting the restrictions.

85 charles <> 2012-02-15
Preserve spaces in the book name in the content-disposition header.

84 charles <> 2011-11-22
Remove extra </span>

83 charles <> 2011-11-21
Remove deprecated meta language tag. Instead put it on html element.

82 charles <> 2011-11-20
Changes submitted by edent:
- add size to link to format
- correctly escape ampersands in various places
chaley is offline   Reply With Quote
Old 02-15-2012, 03:55 AM   #197
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by ilovejedd View Post
Thanks! Would the following work?
Code:
$config['restrict_display_to'] = array('admin'=> '', 'user1' => '#user:=all or #user:=user1', 'user2' => '#user:=all or #user:=user2');
Yes. Note that if you are using the internal login feature as opposed to apache authentication, then you must be running 0.2.8.
Quote:
Special request, would it be possible to add a configuration for preferred book name? For example, instead of Artemis_Fowl___Eoin_Colfer.epub, you can set it to Eoin Colfer - Artemis Fowl.epub ({author} - {title}). If that's too much hassle, even retaining the default calibre name of Artemis Fowl - Eoin Colfer.epub would be fine, too. Thanks!
I changed the server to preserve spaces in the existing name. This was a mild PITA because firefox won't accept spaces in the content-disposition header while IE will. Both accept escaped file names.

Note that the release 0.2.8 provides the 'no download' feature you asked for.
chaley is offline   Reply With Quote
 
Enthusiast
Old 02-15-2012, 02:03 PM   #198
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: 2,302
Karma: 5761596
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
Quote:
Originally Posted by chaley View Post
Yes. Note that if you are using the internal login feature as opposed to apache authentication, then you must be running 0.2.8.
I changed the server to preserve spaces in the existing name. This was a mild PITA because firefox won't accept spaces in the content-disposition header while IE will. Both accept escaped file names.

Note that the release 0.2.8 provides the 'no download' feature you asked for.
Thank you very, very, very much!
ilovejedd is offline   Reply With Quote
Old 02-16-2012, 04:31 PM   #199
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: 2,302
Karma: 5761596
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
Played around with the templates to strip most of the styling and put them in CSS. Here are the revised .tpl files (header, footer, index, category & books_section) along with some sample stylesheets. The file stylesheet.css must be in the same folder as index.php.

stylesheet.css:
Code:
001: uses the original styles (stylesheet.css is a copy of this file)
002: similar to original style but uses different font
003 & 004: changed header/footer background color, added button styling
005: similar to 004, added background color
Also working on a template for something more mobile-friendly.

Not really particularly artistic. Hopefully, someone with a more artistic bent will modify the CSS to something more pleasing to the eye.
Attached Files
File Type: zip calibre_php_server-css.zip (8.5 KB, 112 views)

Last edited by ilovejedd; 02-16-2012 at 04:34 PM.
ilovejedd is offline   Reply With Quote
Old 02-17-2012, 05:23 AM   #200
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by ilovejedd View Post
Played around with the templates to strip most of the styling and put them in CSS. Here are the revised .tpl files (header, footer, index, category & books_section) along with some sample stylesheets. The file stylesheet.css must be in the same folder as index.php.
Thanks. The changes will be in the next release.

While playing with your changes I noticed that the background of the ratings image (images/five_stars.png) was set to white instead of transparent, messing up any change to the background. A fixed file is attached.
Attached Images
 
chaley is offline   Reply With Quote
Old 02-24-2012, 04:13 AM   #201
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 312
Karma: 9313
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Hi,

If anybody is interested I modified the template to make it xhtml and 90% valid w3c code.

I modified ilovejedd's template version and added some new styles.

I still have some work to do with the book_section.tpl to make it both valid and working.

As a side note, I'm using Nginx and I'm not able to download any epub. I can't test with apache so can anybody tell me if download works if the calibre directory is not inside the web site directory (in my case my web dir is /var/www/ebook and my calibre directory is /home/calibre/Calibre).

@chaley do you use any versionning system for this project ? a github / google code / bitbucket account could be a good idea, don't you think ?
vlad59 is offline   Reply With Quote
Old 02-24-2012, 05:55 AM   #202
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by vlad59 View Post
As a side note, I'm using Nginx and I'm not able to download any epub. I can't test with apache so can anybody tell me if download works if the calibre directory is not inside the web site directory (in my case my web dir is /var/www/ebook and my calibre directory is /home/calibre/Calibre).
My library (calibre directory) is not in web space and downloads work fine.

When other people have had problems with downloading, it has been faulty URL rewriting. The download links have 'extended' information on them (info after the .php segment). If that extra info isn't passed along, the download will fail.
Quote:
@chaley do you use any versionning system for this project ? a github / google code / bitbucket account could be a good idea, don't you think ?
I use bzr. I haven't made the repository public, mostly because I have some private files also under VC and haven't bothered to separate them out.
chaley is offline   Reply With Quote
Old 02-24-2012, 12:20 PM   #203
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 312
Karma: 9313
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by chaley View Post
My library (calibre directory) is not in web space and downloads work fine.

When other people have had problems with downloading, it has been faulty URL rewriting. The download links have 'extended' information on them (info after the .php segment). If that extra info isn't passed along, the download will fail.
Thanks I'll try to check that. I already use the tweak on some previous page of this thread. I must have forgotten something.

Quote:
Originally Posted by chaley View Post
I use bzr. I haven't made the repository public, mostly because I have some private files also under VC and haven't bothered to separate them out.
I'll attach here my modifications later tonight then.

EDIT : I'm too tired tonight so I'll upload it next sunday ...

Last edited by vlad59; 02-24-2012 at 03:33 PM.
vlad59 is offline   Reply With Quote
Old 02-25-2012, 08:16 PM   #204
CyberMike
Junior Member
CyberMike began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
Error

Hi

I have been reading some time with you very interested in the forum. When I now want to use my eBook available on the web on my books, I've been looking for a way. Here I found the Calibre PHP content server that meets all my needs.

I installed everything exactly as directed and adapted the paths. When you call the index.php I get the following error message from the server.


Quote:
Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file' in /www/htdocs/-------/calibre/db.php:160 Stack trace:
#0 /www/htdocs/-------/calibre/db.php(160): SQLite3->__construct('/metadata.db', 1)
#1 /www/htdocs/-----/calibre/db.php(195): MySQLite->open('/metadata.db')
#2 /www/htdocs/-----/calibre/index.php(53): CalDatabase->__construct(NULL)
#3 {main} thrown in /www/htdocs/------/calibre/db.php on line 160

I hope you can help in solving my problem.

The PHP server-info is located here and the page is here.

Thanks in advance

MIKE

Last edited by CyberMike; 02-26-2012 at 01:40 PM.
CyberMike is offline   Reply With Quote
Old 02-25-2012, 10:36 PM   #205
Zatakawa
Enthusiast
Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.Zatakawa ought to be getting tired of karma fortunes by now.
 
Zatakawa's Avatar
 
Posts: 37
Karma: 500222
Join Date: Mar 2011
Device: none
EDIT: Solved. I had to move library_dir out of /home and adjust smarty_dir permissions by executing chown -R www-data:www-data /tmp/smarty_test

Thanks for creating and sharing your server!

I've set up your content server, but when i open index.php, all i get is an Error 500 in Chrome or a blank page in Firefox/Opera. Apache's error.log gives the exact same message which user Eibi got a month ago. How can i troubleshoot this further?

OS: Ubuntu 11.10
Webserver: Apache 2.2.20, PHP 5.3.6-13ubuntu3.6
SQLite3 module enabled, gd support enabled
Smarty 2.6.26.
Smarty seems to work, at least this does not throw an error:
Code:
require_once('Smarty.class.php');
$smarty = new Smarty();
config_local.php:
Code:
...
        $config['library_dir'] = '/home/peter/bib';
	$config['web_dir'] = '.';
	$config['smarty_web_dir'] = $config['web_dir'] . '/smarty';
	$config['smarty_dir'] = '/tmp/smarty_test';
	$config['smarty'] = '/usr/share/php/smarty';
...
If you need any more information, please let me know!

Last edited by Zatakawa; 02-25-2012 at 11:50 PM.
Zatakawa is offline   Reply With Quote
Old 02-26-2012, 01:44 PM   #206
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 312
Karma: 9313
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
As promised, here is my XHTML 100% w3c valid version.

I had to modify some PHP code to make it work. If you find some problem with it I'll try to solve as quickly as possible.

calibre-php-server-xhtml.zip
vlad59 is offline   Reply With Quote
Old 02-29-2012, 02:50 AM   #207
CyberMike
Junior Member
CyberMike began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2012
Location: Germany
Device: Sony PRS-T1
Can anybody help me with my Problem ?

Post 204

thx
Mike
CyberMike is offline   Reply With Quote
Old 02-29-2012, 03:38 AM   #208
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by CyberMike View Post
Can anybody help me with my Problem ?

Post 204

thx
Mike
The server is saying that it cannot find or cannot open the database metadata.db in your calibre library. Either the path in $config['library_dir'] is wrong or the web server does not have permissions to read the files in that directory.
chaley is offline   Reply With Quote
Old 02-29-2012, 05:26 AM   #209
chaley
"chaley", not "charley"
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: 4,706
Karma: 800144
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by vlad59 View Post
As promised, here is my XHTML 100% w3c valid version.

I had to modify some PHP code to make it work. If you find some problem with it I'll try to solve as quickly as possible.
Thanks for this. I haven't done anything yet because of other commitments, but I will in the next few days.
chaley is offline   Reply With Quote
Old 02-29-2012, 05:39 AM   #210
vlad59
Addict
vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.vlad59 can eat soup with a fork.
 
Posts: 312
Karma: 9313
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
Quote:
Originally Posted by chaley View Post
Thanks for this. I haven't done anything yet because of other commitments, but I will in the next few days.
No pressure ! Take your time.
vlad59 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 06:16 PM.


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