09-19-2010, 05:12 PM | #1 |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Calibre beta available that fully integrates custom fields
Edit: New information is underlined.
Dear all, This beta makes a significant upgrade of calibre available for testing. This note describes beta release 0.7.906. The major enhancements (that I remember) are:
The beta manual is available here. This is a near-final beta release. We expect that the release will be final this week. There haven’t been any changes to the database schema, which means that it is possible to try the beta, then uninstall and revert to a production release (an uninstall is necessary). I add the ‘possible’, because you will need to manually undo any changes to preferences (e.g., custom fields in templates), and the production releases will not like composite columns. The best approach is to copy your library, install the beta, then try a few things to see if it works well enough in your configuration. If it does not, then uninstall calibre, reinstall the production version, and switch back to the original library. Please post comments on this thread. I will edit this post as necessary to keep it up-to-date. The beta is available at http://calibre-ebook.com/downloads/betas/. The .msi is for windows, the .dmg is for macs, and the other two are for linux. Last edited by chaley; 09-30-2010 at 03:34 AM. Reason: Latest feature list |
09-19-2010, 06:20 PM | #2 |
Guru
Posts: 739
Karma: 1018859
Join Date: Jun 2008
Location: Near Seattle
Device: kindle1, K3, K3G (thanks MR), iTouch, Kindle Touch
|
I'm sure I speak for all in extending a very big thank you to you and Kovid. Calibre is great and keeps getting better.
cheers |
Advert | |
|
09-20-2010, 12:03 AM | #3 |
Well trained by Cats
Posts: 30,360
Karma: 58053696
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Trying to save Save to disk preferences (changed only a tick box)
Code:
ERROR: Invalid template: <p>The template 00NoSeries/{author_sort[0]}_authors/{authors}/{title}_{id}-{authors} is invalid:<br>string index out of range |
09-20-2010, 03:30 AM | #4 | |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The problem is that the original validation code required foreknowledge of all possible fields, which isn't possible any more. I originally removed validation, but recently I thought I had a solution. Clearly I didn't. The same problem would arise when using save paths. For example, if you used {series[0]} and the series was null, an exception would (well, will in the current beta) be thrown. I fixed that too. |
|
09-20-2010, 09:22 PM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I've misplaced the bazaar launchpad link that Kovid sent out for source on this. Can someone post it? Thanks!
|
Advert | |
|
09-20-2010, 10:24 PM | #6 |
creator of calibre
Posts: 44,321
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
lp:~kovid/calibre/custom-serializer
|
09-21-2010, 08:58 AM | #7 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
09-21-2010, 11:27 AM | #8 |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
For developers
Notes for those of you who do development from time to time:
The new metadata interface is much easier and more convenient to use than the older interfaces. Given a book, you can get values and column metadata. There is a method that formats the value for you, and another method that accepts an arbitrary template, returning the resulting string. If you are working in database-land, then use db.get_metadata to get a book structure. Get_metadata is now cached, so the performance is acceptable. The book is a Metadata instance (ebooks/metadata/book/base.py), so all the methods in that class will be available to you. You can also use a new set of field-oriented interface methods to get metatada, to get lists of field keys (sort/search names), and to get field values by name. If you are working in device-driver land, then the book you are used to is now a Metadata instance. The JSON cache now contains all the attributes, so you can trust the book to have whatever standard or custom attributes were there when the book was last written to the cache. My experience is that Metadata (book) instances are much easier to use than what we had before. Getting a field is as easy as book.get('field'). Getting a field's type is book.metadata_for_field('field')['datatype']. Getting a formatted value is book.format_field('field'). Don't hesitate to ask questions. Even some suggestions will be entertained. |
09-21-2010, 11:42 AM | #9 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
I can see why the rewrite was such a big effort. Behind the scenes lots of code to access the database had to be rewritten to use the new metadata interface. Am I correct in thinking that this is part of the long term goal to support other types of library structures, beyond the current /drive/folder/file system?
If it's of any help, one more datapoint for you is: My first tests of saving files, using custom metadata to name the saved files, checking the custom metadata in .opf files and reimporting files with the custom metadata going back into the correct custom column have all been successful. |
09-21-2010, 12:32 PM | #10 | ||
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
This project got started when I and Kovid started discussing how to redo the database/library interface to be general. We (he, really) quickly realized that we needed to find a way to do it stepwise. The idea that presented itself was to do an interface that incorporated custom fields, then be able to serialize that information to OPFs and calibre's cache. That is where we are now. We (I) learned a great deal during this process. One example outcome was the move to table-driven data types (field_metadata). This allowed us to settle on a 'key' attribute naming structure, where the key is the one-true field name. This led to the attribute-level interface in Metadata. And so on. The next step - refactoring of the library to use arbitrary storage, will probably wait a while. First, Kovid will drive that project, which is reasonable because he will need to live with it, and he is busy. Second, we probably should slow down the change rate of 'fundamental stuff', primarily so things don't get broken out of ignorance. Quote:
|
||
09-21-2010, 01:46 PM | #11 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
And this explains why this code branch is called "custom-serializer." I did wonder a bit.
|
09-21-2010, 04:48 PM | #12 |
Grand Sorcerer
Posts: 11,932
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Near-final beta binary now released
All,
Version 0.7.901 of the beta has been uploaded to the server. This version:
There is nothing in the 0.7 standard releases that is not included in this beta, and will not be included in the production release when it happens. This could easily be the last beta before this release series inserts itself into the existing 0.7 sequence. Our target is to switch over next week, when this beta will become 0.7.21. If you have any concerns, please test this release. If we don't know about a problem, we can't fix it. Note: if you install the beta, you will need to uninstall it before you will be able successfully to install the subsequent 0.7 releases. |
09-21-2010, 09:51 PM | #13 |
Well trained by Cats
Posts: 30,360
Karma: 58053696
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Don't kill me ;)
Code:
--------------------------- ERROR: ERROR: Unhandled exception --------------------------- <b>AttributeError</b>:'NoneType' object has no attribute 'split' --------------------------- OK Copied Hide Details... --------------------------- XP HanlinV5 (Astak, Lbook FW) Happens a short while after I connect the device and it is/has fetching metadata.calibre to show titles on device I uninstalled 7.19 before installing 7.901 Update. I watched the Task list Getting list of books on device: approaches 100% @ 55secs when it fails. Last edited by theducks; 09-21-2010 at 09:56 PM. Reason: updated |
09-22-2010, 02:12 AM | #14 |
tenjooberrymuds
Posts: 58
Karma: 12
Join Date: Sep 2010
Device: Android
|
How portable is a windows installation of Calibre, do you go by "microsoft best err.. worst practice" and write everything to the registry, or can I install the beta copy of Calibre on another drive to mess around on, without killing my first installation?
|
09-22-2010, 04:32 AM | #15 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I'm getting the same error theducks is getting. 0.7.901, XP SP3, Cybook Gen3. Reproducible, occurs everytime the device is plugged in and Calibre tries to get metadata (at least, that's what it says in the jobs manager).
Full error report: ERROR: FEHLER: Unbehandelte Ausnahme: <b>AttributeError</b>:'NoneType' object has no attribute 'split' Traceback (most recent call last): File "site-packages\calibre\gui2\__init__.py", line 297, in dispatch File "site-packages\calibre\gui2\device.py", line 753, in metadata_downloaded File "site-packages\calibre\gui2\device.py", line 1384, in set_books_in_library File "site-packages\calibre\library\database2.py", line 593, in get_metadata AttributeError: 'NoneType' object has no attribute 'split' Edited to add: Should this matter, I only made a copy of my library on another computer and tested that, so metadata on the device should be the same as in the library. Still further edited to add: After messing around with the amazing (Really! I love it to death!) S&R- function, I discovered that the last point obviously doesn't matter. Same error, different metadata. Also, I can't access any of the books on the device, and the "On device"- column isn't created. The buttons in the main toolbar for reader memory and expansion card appear correctly, though. Next edit: This error also occurs when trying to connect to a folder (I wanted to try something without messing up the books on my device). Also, when trying to send books to said folder, I get another error, altough that may be a consequence of the first one: ERROR: FEHLER: Unbehandelte Ausnahme: <b>AttributeError</b>:'list' object has no attribute 'add_book' Traceback (most recent call last): File "site-packages\calibre\gui2\__init__.py", line 297, in dispatch File "site-packages\calibre\gui2\device.py", line 1287, in books_uploaded File "site-packages\calibre\gui2\device.py", line 349, in add_books_to_metadata File "site-packages\calibre\devices\usbms\driver.py", line 246, in add_books_to_metadata AttributeError: 'list' object has no attribute 'add_book' Last edit, I promise: For what it's worth, the books appear to get sent correctly. Last edited by Manichean; 09-22-2010 at 05:08 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sony collections and custom fields: how to handle duplicates? | chaley | Calibre | 13 | 09-02-2010 04:11 PM |
Amazon integrates Video and Audio with Ebooks | luqmaninbmore | News | 22 | 06-28-2010 06:22 PM |
PRC file doesn't fully import into Calibre | MSJim | Kindle Formats | 1 | 06-01-2010 02:55 PM |
Calibre custom news feed and python help. | harrynewman | Calibre | 4 | 10-08-2009 09:26 AM |
Smashwords integrates with Stanza, optimized for iPhone | Smashwords | News | 1 | 11-29-2008 03:26 PM |