Quote:
Originally Posted by zakman
So I just imported a list of my books from Goodreads into Calibre and need to do some cleanup. All of the imported books that are part of a series are now titled like so (apologies for extra ASCII):
Title---------------------------------------------------------Series
=======================================
Book Name (The Blah Saga, #7)-------------------------(empty)
If possible, I'd like to change the metadata so it's more in line with the rest of my library:
Title------------------Series
===============================
Book Name----------The Blah Saga [7]
Is this possible? If so, how? I'm pretty new to maniupulating the data like this in Calibre, so the more details, the better. Thanks!
|
You can do this with calibre's bulk metadata search and replace. It requires 3 search/replace operations.
The steps:
- *Back up your library*. Things can go very wrong and you might need to get back to ground 0.
- Assuming you have more than one book, press E to open bulk metadata edit.
- Click on the Search and replace tab.
- If needed, change the Search mode to "Regular Expression.
- Do the first search and replace to copy the series number to calibre's series_index column.

Press the Apply button.
- Do the second S/R to copy the series name to calibre's series column.

Press the Apply button.
- Finally, remove the extraneous information from the title.

Press the OK button to apply the S/R and close the dialog.
The regular expression
Code:
^(.*) \((.*), #(\d*)\)
says Starting at the beginning of the line (the title) find all characters up to " (", capturing them in the first capture group. Next the characters up to ", #" (the series name) are captured in group 2. Finally, the digits up to the closing ')' are captured in group 3.
Note that the images show the regular expression
Code:
^(.*).*\((.*), #(\d*)\)
The one above replaces the ".*\(" with " \(", which is cleaner. I didn't bother to remake the images.