|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jul 2025
Device: paperwhite
|
![]()
Hi all,
I use a custom boolean/float column named **#rating** (so I can store half-star values) instead of Calibre’s built-in rating column. When I try to search and sort by that custom column from the command line with calibredb I get errors like:
Examples: This fails: Code:
calibredb list --search '#rating:True' --fields=rating,title,authors --sort-by='#rating' Unknown sort field: #rating Code:
calibredb list --search '#rating:True' --fields=#rating,title,authors --sort-by=rating Unknown fields: #rating Code:
calibredb list --search '#rating:True' --fields=rating,title,authors --sort-by=rating
Notes / what I’ve tried
Is there a supported way to reference custom columns (including those starting with “#”) in calibredb --fields, --search and --sort-by? If so, what is the exact syntax? |
![]() |
![]() |
![]() |
#2 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jul 2025
Device: paperwhite
|
As a workaround I believe I could copy all values from my custom #rating column to the default rating column, rounding either up or down to the closest full star value. Then I can just use the rating column that is working without problem. I've made another thread for that.
|
![]() |
![]() |
![]() |
#3 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,890
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You can display custom columns by replacing the '#' with a '*' as documented under --fields in the calibredb list documentation and help text. Example using #my_rating instead of #rating:
Code:
calibredb --with-library=. list --fields=*my_rating,title --sort-by=rating --ascending Code:
calibredb --with-library=. list --fields=*my_rating,title --sort-by=*my_rating --ascending |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The changes are in calibre source and will be in the next preview/release.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Column: Average Rating by Author | Lys | Library Management | 5 | 12-09-2022 04:31 AM |
Custom rating column in the database | ownedbycats | Library Management | 6 | 03-16-2022 02:31 PM |
Build Custom Stars Rating Column. | oren64 | Calibre | 2 | 09-18-2016 04:18 AM |
Custom column - Rating | twstdwspr | Library Management | 7 | 09-24-2015 08:14 PM |
Manual Sort or Sort by custom column | Dethmaul | Marvin | 2 | 04-28-2014 11:54 AM |