Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2010, 12:24 PM   #16
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
The good news is that the 2 new Collections appear correctly in the Collection list (1st attached image).

The bad news is that the sort order in each is "unusual".

%All by author (see 2nd attached image)
  • Authors out of sequence.
  • Within each Author, books are in "simple" Title sequence, i.e Title as if not modified by Plugboard to have abbrev. series/index added to the front.

%All by title (see 3rd attached image)
Similar to above, Titles are in "simple" Title sequence ... ahh... but is this what you intended for All by Title?
I've also attached the database/cache files.
The author problem is my silliness. I used author, not author_sort. That is a mistake I shouldn't have made. I will fix it.

As for the title, when building collections I have the 'real' book information, not the Sony DB information. As such, I see what is in the book. You can fix this by adding a plugboard EPUB->PRS505 setting title_sort to the value you are putting into title.

I will look to see if I can get the device_db values, but that might be complicated.
chaley is offline   Reply With Quote
Old 12-21-2010, 12:30 PM   #17
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
In case you are willing, here is a copy of books.py that uses author sort instead of author. Use it instead of the one in the previous post.

This will (should) fix the by_author list, but won't have any effect on the by title list unless you have added the plugboard entry and resent the books.
Attached Files
File Type: zip books.zip (3.1 KB, 218 views)
chaley is offline   Reply With Quote
Old 12-21-2010, 12:53 PM   #18
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by chaley View Post
The author problem is my silliness. I used author, not author_sort. That is a mistake I shouldn't have made. I will fix it.
Don't worry about it. I was an IT professional for 25 years, I understand the nature of testing.

Quote:
Originally Posted by chaley View Post
As for the title, when building collections I have the 'real' book information, not the Sony DB information. As such, I see what is in the book. You can fix this by adding a plugboard EPUB->PRS505 setting title_sort to the value you are putting into title.
As long as the 2 plugboards can co-exist that would be fine by me as a solution.


Can you clear up a little confusion with the 2 new Collections? To repeat some info from post #1, all my existing Collections (from tags only) sort by author_sort, series, series_index, title by using a custom composite column, #coll505sort, with template
Code:
{author_sort:titlecase()} - {series}{series_index:0>2s| | - }{title}
with the calibre tweak:
Code:
sony_collection_sorting_rules = [(['*'], '#coll505sort')]
Are the 2 new Collections "special cases" which will ignore the tweak and work from first principles?
jackie_w is offline   Reply With Quote
Old 12-21-2010, 12:56 PM   #19
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Oops! we cross-posted. I will retest everything this evening and report back.
jackie_w is offline   Reply With Quote
Old 12-21-2010, 01:06 PM   #20
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
Can you clear up a little confusion with the 2 new Collections? To repeat some info from post #1, all my existing Collections (from tags only) sort by author_sort, series, series_index, title by using a custom composite column, #coll505sort, with template
Code:
{author_sort:titlecase()} - {series}{series_index:0>2s| | - }{title}
with the calibre tweak:
Code:
sony_collection_sorting_rules = [(['*'], '#coll505sort')]
Are the 2 new Collections "special cases" which will ignore the tweak and work from first principles?
Yes, in the code you have. That code gets its values from the book as modified by the plugboard. By_author sorts by author_sort, then title_sort. By_title sorts by title, then by author_sort.

Looking at code, I have figured out how to pass the device_db values into the collections code, so the answer becomes 'somewhat'. When I release the code (assuming Kovid approves), the new collections will be hard-coded to sort:
by_author: device_db author_sort, then device_db title_sort. These will use plugboard values.
by title: device_db title_sort, then device_db author_sort, again using plugboard values.

I don't see any reason to provide user-settable sorting for these special collections, given their purpose. If someone wants something different from these, then they can do it with custom columns.
chaley is offline   Reply With Quote
Old 12-21-2010, 02:05 PM   #21
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
OK, dinner's over.

I have hit a snag in Step 7 (connecting the device the first time). Here are the error msg and details:

Error msg:
Error communicating with device

Details:

Spoiler:
Code:
'sony_all_books_by_author_collection'

Traceback (most recent call last)
File "site-packages\calibre\gui2\device.py",
 line 63, in run
File "site-packages\calibre\gui2\device.py",
 line 333, in sync_booklists
File "site-packages\calibre\devices\prs505\driver.py",
 line 164, in sync_booklists
File "site-packages\calibre\devices\prs505\sony_cache.py",
 line 432, in update
File "site-packages\calibre\devices\prs505\sony_cache.py",
 line 494, in update_playlists
File "C:\Program Files\Calibre\Lib\site-packages\calibre\devices\usbms\books.py",
 line 136, in get_collections
KeyError:
 'sony_all_books_by_author_collection'



Purely as an aside, I had to type in the above details as the Copy to Clipboard button copied the error msg not the details
jackie_w is offline   Reply With Quote
Old 12-21-2010, 02:41 PM   #22
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
At this point the testing process has become rather complex. I must construct versions of code that do not depend on any other parts of calibre.

I am going to submit the changes for release, and we can play again at that point.

Thanks very much for your help!
chaley is offline   Reply With Quote
Old 12-21-2010, 02:44 PM   #23
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
You're most welcome. I'll look forward to it.
jackie_w is offline   Reply With Quote
Old 12-23-2010, 08:20 AM   #24
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The new collections are in the next release, made available through device customization, not tweaks.

What you (will) do:
- Open preferences, plugins, device plugins, sony.
- go to the collections box at the bottom.
- to enable the all-by-title collection, enter 'abt:Collection Name' (without the quotes). The abt: part tells calibre you want the all-by-title collection. The Collection Name part is the name that appears on the device; make it whatever you want (no commas).
- to enable the all-by-author collection, enter 'aba:Collection Name'.

The abt collection is sorted by title_sort. You might need to ensure that your device_db -> PRS505 plugboard sets the title_sort value. The aba collection is sorted by author_sort, then title_sort. As before, if you want something non-standard in these fields, use a plugboard.

For sorting, these collections use, in order:
- the author_sort/title_sort values set by the device_db->PRS505 plugboard
- the metadata values stored in calibre's library
The values set by a EPUB->PRS505 plugboard affect only the metadata stored in the book, and are not used when manipulating collections.
chaley is offline   Reply With Quote
Old 12-23-2010, 09:43 AM   #25
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
OK. I'll download the next release as soon as available and let you know.

Just a quick question, when setting the 2 new Collection names, are embedded spaces allowed? i.e. is the following a valid entry in the Collections box (assuming I also wish to retain my tags Collections) :
Code:
aba:All by Author, abt:All by Title, tags
jackie_w is offline   Reply With Quote
Old 12-23-2010, 09:45 AM   #26
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
Just a quick question, when setting the 2 new Collection names, are embedded spaces allowed? i.e. is the following a valid entry in the Collections box (assuming I also wish to retain my tags Collections):
Code:
aba:All by Author, abt:All by Title, tags
Yes. I name mine 'aba:%All by author' (note the %) so that it is guaranteed to sort at the head of the list.
chaley is offline   Reply With Quote
Old 12-23-2010, 09:56 AM   #27
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Good. Thank you
jackie_w is offline   Reply With Quote
Old 12-23-2010, 08:40 PM   #28
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
I do believe you've fixed it. Let joy be unconfined!

For completeness I've attached screencaps of the 2 new special Collections, %All by Author and %All by Title

I hope you have a very Happy Christmas
Attached Thumbnails
Click image for larger version

Name:	AllbyAuth_650_coll3.jpg
Views:	363
Size:	153.2 KB
ID:	63404   Click image for larger version

Name:	AllbyTitle_650_coll3.jpg
Views:	339
Size:	152.5 KB
ID:	63405  
jackie_w is offline   Reply With Quote
Old 12-24-2010, 08:53 AM   #29
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: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by jackie_w View Post
I do believe you've fixed it. Let joy be unconfined!
You are welcome. Glad it works in a real situation!
Quote:
I hope you have a very Happy Christmas
My son from NYC came to visit two weeks ago. He was supposed to leave last Monday from Heathrow, but that didn't happen. Two subsequent flights being canceled (with two useless trips to the airport), he is still here, now scheduled to leave on Christmas day. I will spend a large part of Christmas driving to/from Heathrow, assuming that plane shows up and takes off.

It is very nice for us parents to have him around, but the situation hasn't been at all good for his Christmas plans.
chaley is offline   Reply With Quote
Old 12-24-2010, 09:16 AM   #30
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
the situation hasn't been at all good for his Christmas plans.
I sometimes think the universe is quite thoughtless.
Starson17 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!, PRS650, Plugboard, book sort order rearranged into a new title Glubbish Calibre 11 11-30-2010 03:38 PM
Problem with Metadata Plugboard cheveguerra Calibre 3 10-05-2010 12:00 PM
For Charles/Chaley Merging user defined metadata Starson17 Calibre 20 07-22-2010 10:27 AM
Sony PRS505 loosing metadata idt1971 Calibre 2 11-22-2008 06:52 PM
Sony PRS505 loosing metadata idt1971 Sony Reader 3 11-22-2008 07:35 AM


All times are GMT -4. The time now is 08:32 AM.


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