Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-20-2021, 10:20 AM   #1
Shakahron
Junior Member
Shakahron began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2021
Device: Samsung Galaxy Tab S6
Regex help, column from other columns

Ok so I've been banging my head against this for a while now and I think it's just beyond me and I'm not even sure if it's actually possible.

I want to take a column built from other columns containing tags and enclose each tag in quotes. Example: Fantasy, Thriller, Action = "Fantasy", "Thriller", "Action".

Apologies if this sounds stupid. I use an android app called tachiyomi to view manga and comics and it requires you to create a json file with tags in that format for each entry.
Shakahron is offline   Reply With Quote
Old 11-20-2021, 10:42 AM   #2
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,731
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Code:
{#comp2:'list_re($, ',', '^(.*)$', '"\1"')'}
Replace "#comp2" with the name of your column containing the tags.

Note that this won't work if any of the tags contain quotes because it makes no attempt to process/escape them.
chaley is offline   Reply With Quote
Advert
Old 11-20-2021, 10:49 AM   #3
Shakahron
Junior Member
Shakahron began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2021
Device: Samsung Galaxy Tab S6
Quote:
Originally Posted by chaley View Post
Code:
{#comp2:'list_re($, ',', '^(.*)$', '"\1"')'}
Replace "#comp2" with the name of your column containing the tags.

Note that this won't work if any of the tags contain quotes because it makes no attempt to process/escape them.
Thank you so, so much. This is exactly what I was looking for. Hope you have an amazing day.
Shakahron is offline   Reply With Quote
Old 11-23-2021, 06:44 PM   #4
zaroz
Member
zaroz began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Oct 2020
Device: Samsung Galaxy Tab S6
Ooh, I have been wondering about the viability of using calibre with tachiyomi myself. Please share your solution when you have it worked out!
zaroz is offline   Reply With Quote
Reply

Tags
help needed, reg expressions

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to regex bulk update the Title column from another column? halloleo Library Management 10 04-16-2021 02:27 AM
Column with Ratio of 2 other Columns? MarjaE Library Management 4 02-21-2020 06:00 PM
Column Built from other Columns question abqkjh Library Management 2 09-15-2017 11:08 AM
Yes/No column built from other columns barlowrm Calibre 5 11-17-2016 02:34 PM
Can I generate sum of column or columns? GeekyGal Calibre 5 09-29-2011 07:32 PM


All times are GMT -4. The time now is 04:07 AM.


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