![]() |
#931 |
Enthusiast
![]() Posts: 38
Karma: 10
Join Date: Mar 2010
Location: UK
Device: PW4, Kobo Aura (Original), Touch, Libra H20, Aura ONE & Clara HD
|
How to send hierarchical tags to device?
Hello all,
I've been trying to google this but either not seeing an answer or understanding them. I currently use Koreader on most of my kobos, so this recipe will be used for this 'o/s'. I created a genre column and set it hierarchical as per the instructions on the calibre manual. I like to use this rather than tags, as there are several tags that are useful to me in calibre, but not so much on the reader. My current recipe for sending to device is: {#genre}{Authors}{Title} But, of course it's not taking the hierarchy into account. So my fanfic crossovers I looked again at the manual and see that I could use either subitems or sublist. But the instructions make no sense to me. I've looked at various threads and the recipes are mostly for showing just the main topic in genre and that's it. I have 3 topics under Genre, each with 20 to 30 subs. I would ideally like these all to show separately, if possible. Any thoughts? |
![]() |
![]() |
![]() |
#932 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 822
Karma: 409968
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
I have a column where it brings me the price in text format. How can I generate a column that depends on another so that it passes it to a number?
|
![]() |
![]() |
Advert | |
|
![]() |
#933 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If you really need an float column then I suggest that you make one (a new column) then use bulk metadata edit search and replace to copy the values from the text column to the new float column. Or enquire of the plugin writer if the plugin could accept a text column and do the conversion itself. |
|
![]() |
![]() |
![]() |
#934 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2022
Device: kindle oasis
|
Hi,
Can someone help me with this save template code? I'm not finding a way to do a OR between the strings. I did try to use first_non_empty function, but it sees the function as text and not “code”. Here's what I have so far: {series[0]} OR {title[0]}/{series} OR {title}/{series_index:0>3s|| - }{series} OR EMPTY - {title}/{pubdate} - {title} This is what I'm trying to achieve: E.g.: #1 Serie: A Song Of Ice and Fire, Serie Index: 3, Title: A Clash of Kings, Date: 2021 📂A ---- 📂 A Song Of Ice and Fire -------- 📂 003 - A Clash of Kings ------------ 📂 2021 - A Clash of Kings E.g.: #2 Serie: , Serie Index: , Title: Calibre is the best, Date: 2022 📂C ---- 📂 Calibre is the best -------- 📂 2022 - Calibre is the best |
![]() |
![]() |
![]() |
#935 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Going from your examples, this template produces the given answer Code:
program: if $series then template('{series[0]}/{series}/{series_index:0>3s|| - } {title}/{pubdate:|| - }{title}') else template('{title[0]}/{title}/{pubdate:|| - }{title}') fi |
|
![]() |
![]() |
Advert | |
|
![]() |
#936 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2022
Device: kindle oasis
|
Quote:
I was using just to explain what I need. Thank you for the help, it's working. Have a nice day! |
|
![]() |
![]() |
![]() |
#937 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 822
Karma: 409968
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
|
I draw on the wisdom of the community:
I have created a series2 column and set it in the metadata plugboard like this: any format / Kindle2 {series:||}{series_index:0>2s|: | - } {#series2:||}{#series2_index:0>2s|: | - } {title} in title field When passing it to the kindle, an unknown series2 field error appears. How could I add a second series on the device? |
![]() |
![]() |
![]() |
#938 |
Preferred pronouns: We/Us
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 187
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
|
OK, I searched and OMG this makes my head hurt and my eyes cross. So I'm just gonna ask.
When I know a book is retail, I tag it "Retail" or "Retail EPUB", etc.. Foolishly, I have tons of duplicate books - some retail, some not. I want to create a column which will search each book's tags and - if certain tags are found, such as "Retail" - will populate that column with that found tag. The goal is to quickly compare duplicate books to see which version is retail. Can anyone help? If you have a better way to achieve my goal, say so! |
![]() |
![]() |
![]() |
#939 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() Custom column: Steps:
Approach 2: use a column icon to mark books with any of the tags of interest. This image shows what it might look like using a downloaded icon on the title column. Steps to do this:
|
|
![]() |
![]() |
![]() |
#940 |
Preferred pronouns: We/Us
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 187
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
|
Sorry I'm so late, but thank you! I'll try both and see which I like better. I'm so glad *someone* know what they're doing cuz it isn't me.
PS - orange kitty is cute. I had one, too. |
![]() |
![]() |
![]() |
#941 |
Preferred pronouns: We/Us
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 187
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
|
My preference is for method 1, but I'm doing something wrong and getting error messages.
If I cut/paste your code (without the whatever, of course) into the template field, I get: TEMPLATE ERROR Formatter: unknown identifier $ near $ If I type it in without the "Program:" I get the following. I will use carets to indicate spaces here: ','^'retail,^list_intersection($tags,^retail^epub' Perhaps I should have mentioned earlier that I'm still using Calibre 4.23.??. |
![]() |
![]() |
![]() |
#942 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Use: Code:
program: list_intersection(field('tags'), 'Retail, Retail EPUB, whatever', ',') |
|
![]() |
![]() |
![]() |
#943 |
Preferred pronouns: We/Us
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 187
Karma: 533346
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
|
Thank you! That worked beautifully. This has been interesting. Can you tell me why it is list_intersection when there is no second list to compare?
|
![]() |
![]() |
![]() |
#944 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
There are two lists. The function field('tags') returns one of them, the book's tags. The other is the constant string in the second parameter. The third parameter tells what character separates items in the list, in this case a comma.
|
![]() |
![]() |
![]() |
#945 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,268
Karma: 7955525
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Template search: find books with extra data files
Starting with calibre 6.17:
This template search will find books that have any extra files in the book's data/ folder: Code:
template:"""program:has_extra_files()#@#:b:yes""" |
![]() |
![]() |
![]() |
Tags |
custom column, tag, tags |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |