Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-06-2024, 10:02 AM   #1
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
sort_columns_at_startup not working?

Hi All,

Just found the tweak for sorting book table at startup using the sort_columns_at_startup setting.

However, I copy the example : [('authors',0),('title',0)]
apply the tweak and restart the program.

I then see the table isn't sorted how I want.

I check the tweak and it is now :

sort_columns_at_startup = [['authors', 0], ['title', 0]]

Ideally I want :

sort_columns_at_startup = [('title', 0), ('series', 0), ('authors', 0)]

but I can't get that to work either as when the program restarts, having applied the tweak, I get :

sort_columns_at_startup = [['title', 0], ['series', 0], ['authors', 0]]

and the only column that appears sorted is the titles.

Please tell me I'm doing something wrong, otherwise I'm going mad.

Thanks All
Angie1000 is offline   Reply With Quote
Old 05-06-2024, 12:02 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,126
Karma: 145735366
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Unless you have multiple books with the same title, neither of the other sorts will have much of an effect.

To sort by the author, series, title, I would suggest entering ('authors', 0), 'series', ('title', 0) for the tweak which should give you [['authors', 0], 'series', ['title', 0]] once you're restarted. This should sort by author, series within the author and then titles.
DNSB is offline   Reply With Quote
Old 05-06-2024, 12:10 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,898
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
A keyword to keep in mind is 'Bias'
So the sort needs to be executed in the reverse order to bias the results of the next .

Your sort also has conflicting requirements. You can't have Series and Title work together. eg Book2 TITLE is Zebra, 3 is Apple, 4 is 3 bodies
The Title sort result should be: 3 bodies, Apple, Zebra,
but the Series sort is the reverse

you can't have both together

If you want to see the Author in Title order, you sort by Title, then Author

You can test your plan by clicking the column headers in the EXACT order you will put in the tweak (2 clicks reverses the column sort)

Series can add even another layer when there are multiple Authors participating in the same series. {Authors} when sorted must all be the same ones (the order shown in the column seems to be ignored)
theducks is offline   Reply With Quote
Old 05-07-2024, 02:34 AM   #4
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
Hi Both of you and thanks for the replies.

I think I should have explained what result I want.

The end result I was after was as if you had clicked the column headers in that order:
Title then Series

This way the result (if you had one author in the DB) would show all non-series books in alphabetical order, but any book in a series would then be in series order.

Following on, if there were 2 different authors, the previous sort would occur with the additional sort of authors.

I hope that's clearer.

Thanks again.
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 02:45 AM   #5
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
Hi David (DNSB)

Tested after sorting titles alphabetically.

Your sort order: ('authors', 0), 'series', ('title', 0)

Result : the only sort that had occurred was on the authors. The series was still messed up, and titles where not sorted either.

Sorry.

I want the sort to work the same as if I had clicked on the title column header, then the series, then the authors.

Thanks
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 02:58 AM   #6
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
Hi theducks

Thanks for the reply but alas, nope.

To test, I sorted books from the table by clicking the tags column header so they were all jumbled.

I set the sort as : ('title', 0), 'series', ('author', 0)

On restart, the only column sorted was the title.

The tweak sort order had changed to :

[['title', 0], 'series', ['author', 0]]

The actual end result I want is to replicate my manual clicking of table headers in the order of Title, Series, Authors.

This results, manually, of books :
alphabetically by author where there is no series
series order by author where there is a series.

I hope this is clearer, and I'll probably now find that this is not possible.

Thanks for the help.
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 03:02 AM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,898
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
That is 2 different sorts.
The tweak does not do Conditional (Series or no series)
theducks is offline   Reply With Quote
Old 05-07-2024, 03:19 AM   #8
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
theducks

While I understand it doesn't do conditional, it should still be able to sort by series starting at blank entries then the series where there are series with any number.

I therefore went back to basics and tried 2 sort attempts.

First, to randomise records, I clicked the Tags table header.

1. sort_columns_at_startup = [('authors', 0), ('title', 0)]

2. sort_columns_at_startup = [('title', 0), ('authors', 0)]

Option 1 got titles alphabetically within authors, as I want but the series are all over the place.

I then added to 2 above, the series :
sort_columns_at_startup = [('authors', 0), ('series', 0) , ('title', 0)]

This results in exactly what I wanted. It mimics clicking manually on Title, then Series, then Authors.

Thanks for all Your help.
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 03:23 AM   #9
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
Hi ALL

Ok, I started with the 2 options :

A) sort_columns_at_startup = [('authors', 0), ('title', 0)]
B) sort_columns_at_startup = [('title', 0), ('authors', 0)]

A got me the titles within authors that was the basis on my requirement.

I then added series :

sort_columns_at_startup = [('authors', 0), ('series', 0) , ('title', 0)]

and this gives me exactly what I wanted, mimicking clicking table column headers Title, Series, Authors manually in turn.

Reverse order was the key, thanks to theducks for mentioning that.

Thanks Both of You for your help with this.
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 04:42 AM   #10
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,145
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Maybe the View Manager plugin might work...
https://www.mobileread.com/forums/sh...d.php?t=129014

You can save the sort method of the current view, then use it as the default startup view.
Karellen is offline   Reply With Quote
Old 05-07-2024, 04:55 AM   #11
Angie1000
Junior Member
Angie1000 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: Kindle Paperwhite 2024
Thanks for that idea Karellen but I have what I needed, and at the moment I can't see a use for that plugin for me, but thanks for bringing to notice. In the future I may need it.
Angie1000 is offline   Reply With Quote
Old 05-07-2024, 08:48 PM   #12
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 36,126
Karma: 145735366
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Angie1000 View Post
Hi David (DNSB)

Tested after sorting titles alphabetically.

Your sort order: ('authors', 0), 'series', ('title', 0)

Result : the only sort that had occurred was on the authors. The series was still messed up, and titles where not sorted either.

Sorry.

I want the sort to work the same as if I had clicked on the title column header, then the series, then the authors.

Thanks
Odd. When I used the tweak I suggested on my computer, it seemed to work. I've attached an image of what I saw. Authors, then series, then title unless no series in which case title. Using your version gave me the same result. If I clicked on title => series => author, the result looked the same.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-05-07 174532.png
Views:	17
Size:	80.4 KB
ID:	208112  

Last edited by DNSB; 05-07-2024 at 08:50 PM.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Endnotes are not working even though they are working on iOS & macOS morty92222 Calibre 0 04-09-2021 08:44 PM
Buy Non working kindle voyage with a working Display/Digitizer. SKK Flea Market 2 06-24-2017 10:35 PM
a href links working/not working mimosawind ePub 5 12-09-2011 12:42 PM
Update: Working - not working? exscentric enTourage eDGe 36 07-22-2011 05:38 PM
What I'm working on AlexBell ePub 3 08-12-2010 04:18 AM


All times are GMT -4. The time now is 06:40 AM.


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