![]() |
#1 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 133
Karma: 52836
Join Date: Feb 2012
Location: São Paulo / Brazil
Device: Kindles: Touch, Voyage, Oasis 9th, Oasis 10th / Kobo: Libra Colour
|
Splitting <title> - <author> in Title field
Hi!
Some time ago I imported around 10 thousand books in one of my libraries. Half of the books <title> - <author> in the field Title, and "Unknown" in the field Author. How do I split <title> - <author> in order to fix the metadata? Thanks. Regards. Last edited by zamana; 02-15-2015 at 02:21 PM. Reason: Grammar. |
![]() |
![]() |
![]() |
#2 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
When importing them, there is an option in Preferences ==> Adding books
Uncheck "Read metadata from file contents rather than file name" and calibre will use the regex in the bottom half of that window to derive metadata from the filename. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 133
Karma: 52836
Join Date: Feb 2012
Location: São Paulo / Brazil
Device: Kindles: Touch, Voyage, Oasis 9th, Oasis 10th / Kobo: Libra Colour
|
Hi!
Thanks for reply, but that's the problem: the books are already imported, and I don't have the original files anymore. Should I remove and re-import the books in the library? Is this the easiest path? Thanks. Regards. |
![]() |
![]() |
![]() |
#4 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
For the future, do that. For the books already imported, you can do the same trick to copy information from column to column using Bulk Edit Metadata, last tab (Search and Replace).
Make sure to choose regex mode. |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 133
Karma: 52836
Join Date: Feb 2012
Location: São Paulo / Brazil
Device: Kindles: Touch, Voyage, Oasis 9th, Oasis 10th / Kobo: Libra Colour
|
That was my first approach, but I simply don't know how to use this resource for my needs...
I'll study the Calibre docs a little. Thanks. Regards. Last edited by zamana; 02-15-2015 at 03:31 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Search title:
Code:
([^-]) - ([^-]) Code:
\2 Apply Search title: Code:
([^-]) - ([^-]) Code:
\1 |
![]() |
![]() |
![]() |
#7 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 133
Karma: 52836
Join Date: Feb 2012
Location: São Paulo / Brazil
Device: Kindles: Touch, Voyage, Oasis 9th, Oasis 10th / Kobo: Libra Colour
|
Hummm, almost there...
The result is joining <title><author> See the attachment, please. Thanks! |
![]() |
![]() |
![]() |
#8 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I am a monumental idiot.
![]() Search title: Code:
([^-]+) - ([^-]+) Code:
\2 Apply Search title: Code:
([^-]+) - ([^-]+) Code:
\1 |
![]() |
![]() |
![]() |
#9 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 133
Karma: 52836
Join Date: Feb 2012
Location: São Paulo / Brazil
Device: Kindles: Touch, Voyage, Oasis 9th, Oasis 10th / Kobo: Libra Colour
|
Are you what!?!?! I can't disagree more!
You saved my day! This time your RegEx worked fantastically! Thank you very much for teaching me. Best regards. |
![]() |
![]() |
![]() |
#10 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, I certainly made a monumentally stupid oversight.
![]() So when I give myself a virtual slap and call myself stupid, hopefully I remember next time to not overlook that... Happy to help, though -- now that I am no longer in monumentally-stupid mode. ![]() I hope the rest of your day remains as good. ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2015
Device: Kindle Paperwhite
|
Almost the same problem
Hi!
I've tried to use your methods to split tile and author fields. The only difference is in my case: <author> ; <title> The separator is ";" not the "-". I've tried a several changes in the regexp but none of them working. Could you please help??? Thank you very much! |
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Swapping out the "-" for ";" -- just the middle separator, not the bit in the character sets.
Search title: Code:
([^-]+) ; ([^-]+) Code:
\2 Apply Search title: Code:
([^-]+) ; ([^-]+) Code:
\1 For more about the wild and wonderful world of regex, check out this website: http://www.regular-expressions.info Taught me (most) everything I know. Worth a look. ![]() |
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2015
Device: Kindle Paperwhite
|
Yes, just as I've thought, but it is nothing happend.
![]() |
![]() |
![]() |
![]() |
#14 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2015
Device: Kindle Paperwhite
|
Done
It's a little mistake: ([^-]+); ([^-]+) ![]() Thank you! |
![]() |
![]() |
![]() |
#15 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing from Title-Author to Author - Title | Amalthia | Calibre | 17 | 01-22-2017 11:20 PM |
the <dc:title>field ? | cybmole | ePub | 2 | 01-31-2014 11:13 AM |
remove author from title field | er0_senn1n | Calibre | 2 | 09-30-2012 04:50 PM |
Copy data from Title field to IDs field | rlh3 | Library Management | 9 | 09-24-2012 08:12 AM |
Reg ex to move 'by author' from title field | maartencoertjens | Library Management | 3 | 10-20-2011 04:26 PM |