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 07-23-2022, 01:03 PM   #1
lbutlr
Enthusiast
lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.
 
Posts: 31
Karma: 103134
Join Date: Feb 2010
Device: iPhone
Searching and replacing in different fields

I imported some books that had titles like “Name of Series 01 Title of First book in series”. I tried to use the multi-edit find and replace to set the series name and index number and was able to do so. I ended up doing it by hand, but I am curious if this is possible.

First, I searched title for (\d\d) and tried to set the index number to \1 but got a string conversion error. I am guessing that Calibre did not like the ’01’ and that I would need to somehow get a ‘1’ and also get a ’11’, but I didn’t have time to figure out the regex for that… ([1-9]?\d) maybe?)

Also, it looks like this would have to be done in two steps, at minimum, one to set the series name and on to set the index number, or is there a way to set both fields in one swell loop?
lbutlr is offline   Reply With Quote
Old 07-25-2022, 06:00 PM   #2
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by lbutlr View Post
I imported some books that had titles like “Name of Series 01 Title of First book in series”. I tried to use the multi-edit find and replace to set the series name and index number and was able to do so. I ended up doing it by hand, but I am curious if this is possible.

First, I searched title for (\d\d) and tried to set the index number to \1 but got a string conversion error. I am guessing that Calibre did not like the ’01’ and that I would need to somehow get a ‘1’ and also get a ’11’, but I didn’t have time to figure out the regex for that… ([1-9]?\d) maybe?)

Also, it looks like this would have to be done in two steps, at minimum, one to set the series name and on to set the index number, or is there a way to set both fields in one swell loop?
I've done this quite a bit. The RE for this one might be something like
^(.*?) (\d+)\s*
Assigning to series as
\1 [\2]
That is,
Name of Series 01 Title of First book in series
results in the series and series index of
Name of Series [1.00]
because of how the series_index is managed after assignment. The title and sort_title are unchanged. You'll have to go back a second time to remove the name of the series and the series_index value from the title... which is why I wrote the RE as I did, so it can be reused (apply find and replace on title, assigning nothing to the title, will replace 'Name of Series 01 ' with nothing, leaving you with 'Title of First book in series' in the title field).
kjdavies is offline   Reply With Quote
Advert
Old 07-26-2022, 03:58 AM   #3
lbutlr
Enthusiast
lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.lbutlr is cognizant of many things which escape those who dream only by night.
 
Posts: 31
Karma: 103134
Join Date: Feb 2010
Device: iPhone
Thanks you!
lbutlr is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Metadata fields e.g. Comments grove Library Management 1 09-28-2021 04:42 PM
How to prevent metadata download from replacing data with empty fields? Naed Library Management 4 03-28-2021 03:23 AM
Replacing code without replacing text? ElMiko Sigil 6 11-30-2011 08:14 PM
Searching for.... in fields help needed mezme Calibre 8 02-07-2010 10:32 AM
Question about doing some searching and replacing in Word texasnightowl Workshop 6 09-11-2008 09:20 AM


All times are GMT -4. The time now is 07:28 PM.


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