Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2011, 12:48 PM   #91
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
It's because pdf isn't configured as a mimetype in the default mimetype list. Add the following line to mimetypes.php:

Code:
'pdf'   => 'application/x-pdf',
It should be obvious where it needs to go.
ldolse is offline   Reply With Quote
Old 01-20-2011, 12:53 PM   #92
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by coyo View Post
I'm now at 0.7.40.
Everything seems to work fine.
Downloading epubs is ok, when I try to download a pdf, I get the following error:
Fatal error: Call to undefined function finfo_open() in /public_html/calibre/modules/book_format.php on line 57.
Could it be that something is missing from my php config?
No, you aren't missing anything. PDF is not in the mimetypes table (it should be). I don't see the exception because finfo_open is in PHP 5.3. PHP5.2 doesn't have it.

I have added PDF to the mimetypes table, and it will be in the next release. However, as I don't know when that release will happen, the file is attached. Replace the existing mimetypes.php with this one.
Attached Files
File Type: zip mimetypes.zip (576 Bytes, 231 views)
chaley is offline   Reply With Quote
Advert
Old 01-20-2011, 03:29 PM   #93
coyo
Junior Member
coyo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Device: ipad
I'm seriously impressed by speed and accuracy of your reply!
All working now. me=happy puppy
coyo is offline   Reply With Quote
Old 01-22-2011, 05:29 AM   #94
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Release 2.4 is available at http://charles.the-haleys.org/calibre/

Change log:
Spoiler:
69 charles <> 2011-01-22 {REL 0.2.4}
Release 2.4

68 charles <> 2011-01-20
Update version number

67 charles <> 2011-01-20
Check PHP version before calling finfo_open() to avoid exception

66 charles <> 2011-01-20
Add PDF to mimetypes table

65 charles <> 2010-12-17
Enable the login failed message

64 charles <> 2010-12-15 {REL 0.2.3}
Release 0.2.3
chaley is offline   Reply With Quote
Old 05-30-2011, 09:24 AM   #95
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Your website stopped working! How am I to recreate it in .NET if it's not working! I was wondering if and how you worked with custom columns...

(I get a 403)
Sweetpea is offline   Reply With Quote
Advert
Old 05-30-2011, 09:39 AM   #96
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thanks! Someone (there are only two possibilities) changed permissions on the webdir. Sigh.

Yes, my server supports custom columns, both as information and as categories.
chaley is offline   Reply With Quote
Old 06-01-2011, 08:48 AM   #97
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
I was poking around the calibre database, and in the views I see something called "books_list_filter". I presume it's some sort of SQL function and I can understand the function of it, but I can't seem to figure out how it works...
Sweetpea is offline   Reply With Quote
Old 06-01-2011, 10:39 AM   #98
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
I was poking around the calibre database, and in the views I see something called "books_list_filter". I presume it's some sort of SQL function and I can understand the function of it, but I can't seem to figure out how it works...
You are looking the PHP?

If so, an SQLite function that calls books_list_filter is created at line 197. The first parameter is the SQL name, the second is the PHP function name (or vice versa -- I don't remember). The function itself is defined on line 113. It must be defined at global scope.

The function checks each record ID against a session array to see if the ID is allowed in the current context. The session array is set by search.
chaley is offline   Reply With Quote
Old 06-01-2011, 01:04 PM   #99
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
I was looking at the views and as those gave an error in my tool, I checked them out.

But I think I figured it out. If I understand it correctly, it's some sort of stored function, except that it is not stored in the database, but in the code of the application. After looking at your PHP code, I figured out how it worked and I have now translated it. Now I need to rewrite my queries to make use of it. It looks like I can't make use of the views that are already defined in the database. They won't give an error message anymore, but they also won't make use of the function...

But my attempt of making a web application surrounding the Calibre database is progessing nicely.
Sweetpea is offline   Reply With Quote
Old 06-29-2011, 02:23 AM   #100
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I've been using this with more friends/family, and found a new issue/ some requests.

The issue is that the next/previous buttons don't work properly in any of the 'Title' views if you change the sort to anything other than the default alphabetical. Basically when you view the first page it is viewed according to your sort, but clicking 'next' takes you to the second page of the default alphabetical sort.

Relating to that, I'd like to be able to control the default sort, or to have the default changed to Date -> Descending so that people can see the most recent books automatically.

I was also thinking about the PHP server in relation to the 'get books' feature - it would be nice to have a store plugin that could be configured for a specific PHP server. Part of the benefit is convenience, but because the PHP server is dealing with a synchronized Calibre library, this also offers the opportunity to automatically transfer the correct metadata to the other party's Calibre, since the store plugin could also grab the metadata.opf file and cover.jpg that is synchronized along with the book. This way the other party doesn't need to fetch their own metadata/covers.

I can probably tackle the store plugin question myself once I have some time, but I tried to look into the PHP code to see if I could tackle the other problems and must admit it's all greek to me...
ldolse is offline   Reply With Quote
Old 06-29-2011, 07:07 AM   #101
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ldolse View Post
I've been using this with more friends/family, and found a new issue/ some requests.
Glad it is working (mostly) for you.
Quote:
The issue is that the next/previous buttons don't work properly in any of the 'Title' views if you change the sort to anything other than the default alphabetical.
Fixed in release 0.2.5.
Quote:
Relating to that, I'd like to be able to control the default sort, or to have the default changed to Date -> Descending so that people can see the most recent books automatically.
Option added in release 0.2.5. See the end of config_default.php
Quote:
I was also thinking about the PHP server in relation to the 'get books' feature - it would be nice to have a store plugin that could be configured for a specific PHP server. Part of the benefit is convenience, but because the PHP server is dealing with a synchronized Calibre library, this also offers the opportunity to automatically transfer the correct metadata to the other party's Calibre, since the store plugin could also grab the metadata.opf file and cover.jpg that is synchronized along with the book.
I am not convinced that a store plugin is the best way to go with this. These plugins don't get metadata. There is a facility to automatically download a book, that that just downloads the book.

On the other hand, if you want books from your library mixed in with books that you can get from other sources, then it makes sense. You should be able to operate like most of the other plugins, using the site's search function and scraping the details. It might be useful for me to add some identifiers to the tags to make it easier to find the metadata that get-books search wants.

Another option that might do the job is to add links on a books page to "download for calibre" or some such. This link would create a zip containing the requested formats (or perhaps one format), the OPF, and the cover. On the calibre side, either the user would unpack these files into a directory and load it (works out of the box), or you write a plugin that can add such a zip file, breaking out the components.
chaley is offline   Reply With Quote
Old 06-29-2011, 07:09 AM   #102
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Release 0.2.5 is available at http://charles.the-haleys.org/calibre/

Change log:
Spoiler:

73 charles <> 2011-06-29 {REL 0.2.5}
Release 0.2.5

72 charles <> 2011-06-29
Add option to specify initial sort

71 charles <> 2011-06-29
Update version number

70 charles <> 2011-06-29
Fix sort spec being reset in db constructor
chaley is offline   Reply With Quote
Old 06-29-2011, 08:51 AM   #103
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Awesome, Thanks for the update!

I was just thinking with the store interface it allows someone to download books directly into Calibre - today getting books using the server from a browser requires a multi-step process (save file, find file, import file to Calibre), and while I was able to teach my parents how to do it it's far from intuitive for them. An older Calibre release automatically imported files associated with Calibre on open, but that hasn't worked for a while.

I like the idea of configuring the plugin with the auth credentials and saving people that step as well.

As far as the metadata goes, I didn't realize that the store plugins don't have any ability set that, but that does make sense that they wouldn't bother. I do like the idea of the bundled 'download for Calibre' zip file - probably best to come up with a new type of extension to recognize/process these bundles and pass it to the right plugin, ala htmlz, txtz, etc. (though custom extension sort of breaks the 'works today' story). A single format in the bundle probably makes the most sense, but bundling the formats might be better from an interface design perspective (just one link).
ldolse is offline   Reply With Quote
Old 06-29-2011, 09:22 AM   #104
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,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ldolse View Post
I like the idea of configuring the plugin with the auth credentials and saving people that step as well.
I am a bit confused.

Assume that my server has a link that will download the components of a book in some container type (zip with a new extension?). How does the user see that link? If from within a browser, then clicking on the link will download the file, as credentials have already been provided. However, the user would need to import that file into calibre (drag & drop would be easiest), which is what I think you are trying to avoid.

Are you considering writing a plugin that acts as a 'sort-of' web browser in a way similar to get-books? The user would search for books and be presented with a set of candidates, along with a download button? In this case, we don't need a new extension, because the plugin can handle the download directly.

I imagine that one could make a 'calibre importer' application that could be associated with an extension in a browser. The application would mimic drag & drop (or something like that). I don't have much of a clue how to write such a thing.
Quote:
A single format in the bundle probably makes the most sense, but bundling the formats might be better from an interface design perspective (just one link).
That was my thought. However, depending on the UI (web browser or plugin), the answer could be different.
chaley is offline   Reply With Quote
Old 06-29-2011, 10:03 AM   #105
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I guess I'm not being clear, I'm trying to simplify several issues with this idea and munging them together. I'll also admit to not having used the 'get books' feature much, I just used it to refresh my memory and realized it doesn't quite work as I recall the last time I touched it.

Part of the problem is the metadata in the book files vs what's in the Calibre DB. If you just download a book from the PHP server today, you don't get the metadata that's in my library, you get whatever crap metadata was in the book originally. There isn't currently any easy way to update the internal metadata for books without using save-to-disk, and that workaround only works for a few formats anyway. A bundled zip file with OPF, cover, etc, as well as a plugin to import that filetype would solve this regardless of the store connection.

My last impression of the Get Books feature was that it did act as a sort of web browser, so a special browser-like plugin wouldn't be required. Now that I've used it again and see that it's more a search aggregator I can see the reluctance on your part, I'm less enthused about that aspect of the discussion. If a user restricted Get Books to a single server it could potentially be useful, but overall the interface doesn't lend itself to working that way.

Looks like the simpler thing to do would be to figure out why Calbre isn't automatically opening/importing filetypes associated with it and leave things as is with the browser. I'll open a bug on this point.
ldolse is offline   Reply With Quote
Reply


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 11:00 AM.


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