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 04-06-2022, 02:36 PM   #931
Arbait
Connoisseur
Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.Arbait ought to be getting tired of karma fortunes by now.
 
Posts: 73
Karma: 673502
Join Date: Jan 2012
Device: enTourage pocket eDGe,Pyrus mini, NOOK HD+, KAO, S6, S8, KP4, Note 10+
Please, more skilled than me, this problem really overwhelms me, please help.
I have all the books in this format.
W E Johns - [Biggles 31] - Biggles Delivers the Goods (epub).epub
What is the correct way to import books into Calibre?

Thank you and excuse the beginner question.

edit:
If i use
Code:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ?
is working ok but only if the file is in the format
W E Johns - Biggles 31 - Biggles Delivers the Goods (epub).epub
so no square brackets ...

Last edited by Arbait; 04-07-2022 at 02:54 PM.
Arbait is offline   Reply With Quote
Old 09-09-2022, 06:26 PM   #932
roguexuk
Enthusiast
roguexuk began at the beginning.
 
roguexuk's Avatar
 
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?
roguexuk is offline   Reply With Quote
Advert
Old 09-18-2022, 01:55 PM   #933
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: 723
Karma: 228142
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?
dunhill is offline   Reply With Quote
Old 09-18-2022, 02:12 PM   #934
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
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?
If the plugin (which one) wants a float column then you can't do it with a column made from other columns. Those are text columns.

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.
chaley is offline   Reply With Quote
Old 10-04-2022, 11:05 PM   #935
trxplz0
Junior Member
trxplz0 began at the beginning.
 
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
trxplz0 is offline   Reply With Quote
Advert
Old 10-05-2022, 02:55 AM   #936
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by trxplz0 View Post
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
I don't understand what your sequence of OR's is supposed to do. Series is either set or not set, but it appears in several of the OR'ed expressions. Title is always set but the OR's seem to account for it being empty. What selects which expression?

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
chaley is offline   Reply With Quote
Old 10-05-2022, 08:30 AM   #937
trxplz0
Junior Member
trxplz0 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2022
Device: kindle oasis
Quote:
Originally Posted by chaley View Post
I don't understand what your sequence of OR's is supposed to do. Series is either set or not set, but it appears in several of the OR'ed expressions. Title is always set but the OR's seem to account for it being empty. What selects which expression?

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

I was using just to explain what I need.

Thank you for the help, it's working.

Have a nice day!
trxplz0 is offline   Reply With Quote
Old 11-11-2022, 06:53 PM   #938
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: 723
Karma: 228142
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?
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	157
Size:	37.2 KB
ID:	197669  
dunhill is offline   Reply With Quote
Old 04-02-2023, 03:43 AM   #939
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 141
Karma: 282160
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!
Ma'am-I-Am is offline   Reply With Quote
Old 04-02-2023, 05:36 AM   #940
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ma'am-I-Am View Post
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!
Approach 1: a custom column with a template. I can understand that idea making your head hurt. You might want to look at Approach 2 below first.

Custom column:
Steps:
  1. Create a new "Column built from other columns, behaves like tags". Name it whatever you want.
  2. Use this as the template.
    Code:
    program:
    	list_intersection($tags, 'Retail, Retail EPUB, whatever', ',')
  3. Ensure that the string 'Retail, Retail EPUB, whatever' contains all the tags of interest. Each tag is separated by a comma. Spelling must be exact, but letter case doesn't matter.
The new column will show the tags from the list that are in the book.

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.

Click image for larger version

Name:	Clipboard03.jpg
Views:	76
Size:	15.2 KB
ID:	200735

Steps to do this:
  1. Find an icon you want to use. Easiest is an online search. The icon should be square, 128x128 pixels (a bit bigger is OK). One icon site is https://www.iconfinder.com/.
  2. Download the icon to a place you can easily find it. I usually use my desktop.
  3. In calibre, go to Preferences / Look & feel / Column icons.
  4. Click the Add rule button.
  5. Use the "Add icon" button to add the downloaded icon to calibre.
  6. For the rest of the dialog:
    • "Set the:" box: icon with text
    • "of the column:" box: Title (or whichever column you want)
    • "To:" the icon you downloaded
    • Only if the following conditions are all satisfied:
      • Choose "Tags" for first box: "If the ...
      • Choose "has" for the second box.
      • Enter the list of tags of interest into the third box, for example "Retail, Retail EPUB", separated by commas. Again, the spelling must be exact but letter case doesn't matter.
      • Press OK, then Apply.
      My example dialog looks like this:
      Click image for larger version

Name:	Clipboard04.jpg
Views:	87
Size:	64.4 KB
ID:	200736
chaley is offline   Reply With Quote
Old 04-08-2023, 04:38 AM   #941
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 141
Karma: 282160
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.
Ma'am-I-Am is offline   Reply With Quote
Old 04-08-2023, 07:01 PM   #942
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 141
Karma: 282160
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.??.
Ma'am-I-Am is offline   Reply With Quote
Old 04-09-2023, 04:06 AM   #943
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ma'am-I-Am View Post
Perhaps I should have mentioned earlier that I'm still using Calibre 4.23.??.
Yes, that is important. The template I provided won't work with calibre that old.

Use:
Code:
program:
	list_intersection(field('tags'), 'Retail, Retail EPUB, whatever', ',')
I tested this using calibre 4.23 portable.
chaley is offline   Reply With Quote
Old 04-09-2023, 04:40 AM   #944
Ma'am-I-Am
Preferred pronouns: We/Us
Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.Ma'am-I-Am ought to be getting tired of karma fortunes by now.
 
Ma'am-I-Am's Avatar
 
Posts: 141
Karma: 282160
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?
Ma'am-I-Am is offline   Reply With Quote
Old 04-09-2023, 04:43 AM   #945
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: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ma'am-I-Am View Post
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?
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.
chaley is offline   Reply With Quote
Reply

Tags
custom column, tag, tags


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 05:37 AM.


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