|
|
#1 |
|
Zealot
![]() Posts: 100
Karma: 10
Join Date: Mar 2014
Device: Clara 2E, Clara BW, Samsung tablet
|
Using a prefix-rule for rating in catalog
I'm trying to set up a prefix rule ( --prefix-rules=() in 'calibredb catalog ....) for the rating field with no success. I've tried a couple of different options:
Code:
--prefix-rules="('Rating','rating','5','5')"
Code:
--prefix-rules="('Rating','rating',5,'5')"
Code:
--prefix-rules="('Rating','rating',None,'0')"
Prefix rules I've set up for other fields work as expected based on the docs. Has anyone tried this? Thanks! dan |
|
|
|
|
|
#2 | |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,116
Karma: 30277960
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
In what format do you want the catalog ?
Quote:
BR |
|
|
|
|
|
|
#3 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 946
Karma: 1004846
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
I tested this command from the Linux Mint terminal: `calibredb list --search="rating:5" --with-library="/home/walter/Dropbox/Library Walter"`. This tells you which books have a rating of 5.
To generate the catalog, use: `calibredb list --search="rating:5" --with-library="/the path to your Calibre library"` |
|
|
|
|
|
#4 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 192
Karma: 197760
Join Date: Oct 2015
Device: Kobo Glo HD (landscape), Kobo Aura One
|
By whatever reason the field rating is not available in catalog for prefix or excluding. Anyhow for the most fields the value is yes/no and cannot be specified. Maybe the GUI catalog (menu icon book convert) make this more clear.
The workaround is to use an own customized field; one for each rating value. That should work. |
|
|
|
|
|
#5 | |
|
Zealot
![]() Posts: 100
Karma: 10
Join Date: Mar 2014
Device: Clara 2E, Clara BW, Samsung tablet
|
Quote:
|
|
|
|
|
|
|
#6 | |
|
Zealot
![]() Posts: 100
Karma: 10
Join Date: Mar 2014
Device: Clara 2E, Clara BW, Samsung tablet
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Zealot
![]() Posts: 100
Karma: 10
Join Date: Mar 2014
Device: Clara 2E, Clara BW, Samsung tablet
|
SOLVED.
The custom field is the key as follows:
Code:
--prefix-rules="(\
('Rating','#ratingcalc','False',''),\
('Rating','#ratingcalc','5','5'),\
('Rating','#ratingcalc','4','4'),\
('Rating','#ratingcalc','3','3'),\
('Rating','#ratingcalc','2','2'),\
('Rating','#ratingcalc','1','1'),\
('Read books','#read','True','✓'),\
('Not Kobo','#to_kobo','False','×')\
)"
The resulting EPUB catalog shows a check-mark as the prefix character for books that are "read" but have no rating, and a number for books that have a rating. A few related notes:
:-)) HTH! Dan Last edited by drawson1; 01-03-2026 at 02:52 PM. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Copy and Round Custom #rating Column to Default Rating Stars | Far_Pen_6884 | Library Management | 1 | 09-15-2025 08:32 AM |
| Catalog: prefix according to rating? | Phssthpok | Library Management | 2 | 08-12-2022 07:00 AM |
| Catalog command-line syntax for prefix-rules | drawson1 | Library Management | 1 | 03-24-2021 12:23 AM |
| Calibredb Catalog "cannot generate catalog in EPUB format | rracoon01 | Library Management | 5 | 07-13-2018 09:19 PM |
| mobi catalog = periodical, ePub catalog = book | trekchick | Library Management | 7 | 03-12-2011 02:11 PM |