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 02-20-2021, 08:02 AM   #16
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,198
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
This is template. Use in place of the one I gave earlier (in the new custom column).
capink is offline   Reply With Quote
Old 02-20-2021, 08:22 AM   #17
norolim
Member
norolim began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2021
Device: none
Quote:
Originally Posted by capink View Post
This is template. Use in place of the one I gave earlier (in the new custom column).
That is what I did straight away, but it returned TEMPLATE ERROR and some gibberish.

So let me go through the process step by step:
  1. Create a new custom column, selecting "Column built from other columns, behaves like tags.
  2. Insert your code in the Template field.
  3. Click OK and restart Calibre.

After I did the above, this is what I got in the new column:


Please mind I'm using version 3.48.
norolim is offline   Reply With Quote
Advert
Old 02-20-2021, 08:26 AM   #18
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,198
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
You need to upgrade for this to work.
capink is offline   Reply With Quote
Old 02-20-2021, 08:33 AM   #19
norolim
Member
norolim began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2021
Device: none
OK, can't do that. Newer versions are not available for Windows 7 and upgrading the OS is not an option. Thank you for all your help.
norolim is offline   Reply With Quote
Old 02-20-2021, 10:46 AM   #20
norolim
Member
norolim began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2021
Device: none
OK, here is what I managed to do, using some ugly coding:

If I use the following as a template:
Code:
{#genre:subitems(0,1)}, {#genre:subitems(1,2)}, {#genre:subitems(2,3)}}
with the following metadata:
Code:
Speculative fiction.Fantasy, Speculative fiction.Science fiction.Steampunk
I get this result:
Code:
Speculative fiction, Fantasy, Science fiction, ,Steampunk
The problem here is that the first item hasn't got a third subitem, so the template returns ", ," in its place. Does anyone know an easy way to get rid of blank subitems? One that will work on Calibre 3.48?
norolim is offline   Reply With Quote
Advert
Old 02-20-2021, 11:19 AM   #21
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,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Use
Code:
{#genre:'list_union('', re($, '\.', ','), ',')'}
Or if you want it sorted
Code:
{tags:'list_sort(list_union('', re($, '\.', ','), ','), 0, ',')'}

Last edited by chaley; 02-20-2021 at 11:33 AM.
chaley is offline   Reply With Quote
Old 02-20-2021, 11:35 AM   #22
norolim
Member
norolim began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Feb 2021
Device: none
Oh yes. Nice one, @chaley. Thank you very much.
norolim is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a tweak for genres and tags to view all child items by default? Whallup Library Management 0 07-16-2020 03:50 PM
Sigil not displaying book view carimbombin2020 Sigil 1 04-22-2020 08:33 PM
Genres - How do I assign a book to 2 genres? RPL Library Management 3 03-08-2018 06:37 PM
replace in book view changes view to code view cybmole Sigil 4 10-28-2012 01:20 PM
Sigil highlight Book View No Longer Shows in Code View Themus Sigil 4 10-04-2012 07:54 PM


All times are GMT -4. The time now is 11:17 AM.


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