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 09-21-2022, 08:00 AM   #1
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Author Emblems

I need help.
Among other things, I trying that in cover grid Calibre displays authors pics as emblems, and I like it.
Problem is basic rule is ok for few authors,
but how to implement that to my main library that has 10k+ authors.
I would need 10k+ rules

How to create advanced rule that would show author image if name of image is equal to authors name.

example of basic rule:
program:
test(str_in_list(field('authors'), '&', "Andy Weir", '1', ''), 'andy weir.png', '');
DBorG is offline   Reply With Quote
Old 09-21-2022, 12:39 PM   #2
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 439
Karma: 145424
Join Date: Dec 2017
Device: Kobo
For only the first author:
Code:
program: list_item($authors, 0, '&') & '.png'
this whil return: Arthur C. Clarke.png

Get emblems for all authors [composed icons]:
Code:
program: rslt=''; authors = $authors;
rslt = list_item(authors, 0, '&') & '.png';
for i in range(1, list_count(authors, '&')):
  if i == 6 then break fi;
  rslt = rslt & ':' & list_item(authors, i, '&') & '.png'
rof;
return rslt
this whil return: Arthur C. Clarke.png:Gentry Lee.png
(the colon is for separate the individual icons. You can limite the number of emblems display by changing the number 6)

EDIT: the case does not matter.

Last edited by un_pogaz; 09-21-2022 at 12:52 PM.
un_pogaz is offline   Reply With Quote
Advert
Old 09-23-2022, 10:11 AM   #3
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Thank you

It works perfectly, and with little tweaking I can use it for whole lots of other things, like with custom column awards i can show award icon if book has some awards and so much more....
Thank you so much.
DBorG is offline   Reply With Quote
Old 09-23-2022, 09:10 PM   #4
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 885
Karma: 409970
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
What size should the png with the author's name be?
dunhill is offline   Reply With Quote
Old 11-09-2022, 07:32 AM   #5
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Quote:
Originally Posted by dunhill View Post
What size should the png with the author's name be?
I think default is 128x128, but I use much larger 600x600, I know it is overkill, but, hey.
DBorG is offline   Reply With Quote
Advert
Old 11-09-2022, 07:40 AM   #6
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Thank you again your solution is great,
and I did manage to adjust it for my custom #awards column.
But then i got greedy, instead of two columns,
one for awards and one for award year, which works with your solution.
I tried hierarchical for awards: hierarchy being awards.year
and I don't know how to add wildcards to rule.
DBorG is offline   Reply With Quote
Old 11-09-2022, 07:43 AM   #7
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
Post

Quote:
Originally Posted by DBorG View Post
Thank you again your solution is great,
and I did manage to adjust it for my custom #awards column.
But then i got greedy, instead of two columns,
one for awards and one for award year, which works with your solution.
I tried hierarchical for awards: hierarchy being awards.year
and I don't know how to add wildcards to rule.
edit: two columns solution works for one award,
but if book has more than one award, you have to use hierarchy.
DBorG is offline   Reply With Quote
Old 11-09-2022, 09:18 AM   #8
DBorG
Member
DBorG began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
think it could be done with command shorten,t o shorten #awards by 5 letters, but to the likes of me whatever I, try its not working.
DBorG is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Misaligned emblems ownedbycats Library Management 0 12-11-2021 02:22 AM
Emblems BigGeeNotts Calibre 3 10-20-2018 05:25 PM
Cover emblems - Where to get? delaing Calibre 10 10-22-2014 07:37 PM
Which are your emblems? Ansem_93 Library Management 1 10-19-2014 06:03 AM
Emblems: Series number? Snorkledorf Calibre 7 08-29-2014 09:43 AM


All times are GMT -4. The time now is 08:21 PM.


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