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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-14-2011, 04:47 PM   #1
flopis
Member
flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.flopis knows the square root of minus one.
 
Posts: 16
Karma: 7700
Join Date: Jan 2011
Device: kindle
Fixing your library: A few How-to in Search & Replace

I ran into some problems with my Calibre library. I had 12,000 reports & books, and 3 thou authors (which should had been less than a thousand). The author and title fields were completely messed up. I needed to clean them to get a better grasp of my library. It was taking me a hell of a long time doing it manually. So, I studied the program a little and posted a few questions in the forum. A very special user, chaley, came to my rescue and I was able to organize my huge library in a single day (Thanks again chaley). Thus, I would like to share my specific problems and the solutions for others to benefit.

Problem 1: Rearrange Authors.
Several authors were in the form: Lastname, Firstname, which is not needed by caliber since automatically sorts by last name. Thus, I wanted them as Firstname Lastname.

How to correct these occurrences in your library?
  1. In Advance Search (the binoculars icon), input a coma "," in Author, and click Ok.
  2. Select all books [Ctrl][a]
  3. Go to bulk edit, Search & Replace, Regular Expression, Search Field: Author
  4. Search: (.*),(.*)
  5. Replace: \2 \1
A word of caution: Always check the Test Window before clicking OK, and make a backup of your library before starting.

Problem 2: Cleaning the Title.
Several titles have .txt or .doc or .lit or .v1, etc. at the end, which prevents fetching the metadata from internet.
How can you get rid of this nuisance?
  1. Advance Search, input a dot “.” in Title, and click Ok.
  2. Select the appropriate books.
  3. Go to bulk edit, Search & Replace, Regular Expression, Search Field: Author
  4. Search: (.*)\.(.*)
  5. Replace: \1
Problem 3: Carving out the series.
Several titles (or authors) fields have the series information, which prevent you from fetching the metadata.
Generally the information is different. I provide 2 examples:
1st Example: Series index has one digit.

The Mean Nutmeg - Stories of Past 1
The Idiot King -Biosaga 5
The Pink Sock - Underwear Tales 9... and so on.


So, how do you carve out the series information from the title field into the series field?
  1. Go to Advance Search, input a dash “-” in Title, and click OK.
  2. Select the relevant books.
  3. Go to bulk edit, Search & Replace, Regular Expression, Search Field: Title, Destination Field: Series
  4. Search: .*- (.*)(\d)
  5. Replace: \1 [\2]
  6. Click on Apply.

2nd Example: Series index has two digits.

The Numen - Stories of Past 12
The Idiot King -Saga of After 21
The Pink Sock - Tales 12... and so on.


So, you change a little your search and replace notation to:
  1. Search: .*- (.*)(\d)(\d)
  2. Replace: \1 [\2\3]
Now you need to clean your title field, removing the unwanted series info. How do you do it?
  1. Destination Field: Title
  2. Search: (.*)-.*
  3. Replace: \1
  4. Click on OK.

I suggest you check the following links:
http://calibre-ebook.com/user_manual/template_lang.html, and
http://calibre-ebook.com/user_manual/regexp.html.

I hope this is useful.

Last edited by flopis; 01-15-2011 at 04:38 PM. Reason: Improve it.
flopis is offline   Reply With Quote
Old 02-17-2013, 02:23 PM   #2
sunnyace
Junior Member
sunnyace began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2013
Device: none
This is really helpful! Thank you!
sunnyace is offline   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search & Replace Pat Nickholds Sigil 2 10-22-2010 12:18 AM
Search & replace TEXT ToeRag Calibre 3 04-10-2010 02:44 PM
Feature Request - replace "screensavers" with randomly selected book covers from libr nathander13 Calibre 3 12-02-2009 01:21 PM
Question - Does iLiab have the "search" & "annotation, highlighting" features? HiSoC8Y iRex 5 07-01-2009 05:37 PM
Swap "Prev Page" & "Next Buttons" ???? kilofox Amazon Kindle 6 04-03-2008 12:39 AM


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


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