10-18-2021, 07:39 AM | #1 |
Member
Posts: 22
Karma: 10
Join Date: Aug 2014
Device: Galaxy Note 8
|
Extract author from title field?
So sorry to ask, but my programming days were 40 years ago. Many .pdf's I import don't have the author in the correct field, instead it is in the title, for instance "Agriculture The Food We Grow and Animals We Raise (Natural Resources) by Julie Kerr Casper".
Right now I have to go to each title, cut text starting with "by" to the end of the title, wait for the edited title to store, enter the author column paste the authors name return to beginning of the field delete "by " Please, please don't tell me to study the template language - I'm happy to make an appropriate donation for a solution to the problem - see screen-clip. Many thanks! |
10-18-2021, 08:14 AM | #2 | |
Wizard
Posts: 2,044
Karma: 13579113
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
Quote:
Search field: Title Search for: \(.*\) by \(.*\) Replace with: \2 Destination field: Author Note that this will not take any 'by' in the Title into account, so it's very basic. Assuming this worked, you can do the same with Replace with: \1 and Destination field: Title to update the title. Again, test whether it does what you want, this is off the top of my head. You will have to fix the author field yourself afterwards (thing like commas instead of & and stuff like that). |
|
Advert | |
|
10-20-2021, 10:38 AM | #3 | |
Member
Posts: 22
Karma: 10
Join Date: Aug 2014
Device: Galaxy Note 8
|
Quote:
- delete the authors from the title - delete the title from the authors oh well, it may still be quicker than simple cut and paste and edit. I'll give it a try with more than 1 title |
|
10-20-2021, 04:46 PM | #4 |
null operator (he/him)
Posts: 20,935
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
If you swap the Author & Title columns, then you could
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Batch edit Author in title field? | andyse7en | Calibre | 1 | 09-03-2020 10:50 AM |
Can Someone Give me the Code Needed to Extract Title/Author From Added Books? | rebeltaz | Library Management | 8 | 07-27-2019 05:10 PM |
Splitting <title> - <author> in Title field | zamana | Library Management | 14 | 06-22-2015 11:40 AM |
remove author from title field | er0_senn1n | Calibre | 2 | 09-30-2012 04:50 PM |
Reg ex to move 'by author' from title field | maartencoertjens | Library Management | 3 | 10-20-2011 04:26 PM |