|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
|
Can Someone Give me the Code Needed to Extract Title/Author From Added Books?
I have tried to figure this out and I am running out of hair to pull.
My ebooks are stored on my drive as such: This.is.a.Title_AuthorFirstName.AuthorLastName.ext Can someone please give me the regex code that I need to give Calibre so that it can properly extract the title and author name (with spaces in place of periods) when adding books to my library? |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I would use a file rename utility to replace the '.'s with spaces, and the underscore to ' - ', to get "This is a Title - AuthorFirstName AuthorLastName" and then use the template {title} - {authors}
Why? Because I'd rather catch any anomalies before I add them. My favourite Windows renamer is Bulk Rename Utility - mainly because I've been using it since the year dot ![]() BR |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
|
Quote:
I really don't want to rename the files. When working with files that have spaces in their filenames from the command, you have to enclose the path/filename in quotes. If you use underscores or dots, though, you can omit the quotes. It's just easier without the spaces and I've grown accustomed to this file naming convention over the past decade or so. |
|
![]() |
![]() |
![]() |
#5 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@rebeltaz - if you can change the name via a command line or utility you can surely change it back again. Otherwise create a folder of hardlinks, massage those filenames as described, upload to calibre, delete the hardlinks.
Why do you want to keep those the.book_first.name_second_name.ext files anyway, calibre's going to copy them into a library using its own directory and file naming rules. BR |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
|
Quote:
That and it's a control thing. I'd rather tell a computer what to do with my data than have the computer tell me what to do with it ![]() |
|
![]() |
![]() |
![]() |
#7 | ||
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quote:
BR |
||
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
|
I may try the hard links thing. I probably wouldn't bother to delete the links. Either that or just copy them to the backup drive, rename the one I'm uploading to calibre and then delete that one.
Thanks for the suggestions. |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
You could also add the books with the dots in the title and author, then use bulk metadata search and replace to fix them (remove the dots). If you use the feature "add tag when adding books" then you can limit the fix operations to the books you just added. You can also "save" the expressions to make it easier to repeat them.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extract Series Number from Title | jpbweb | Library Management | 2 | 11-05-2017 04:07 AM |
Marking Added Books (clarification needed) | icallaci | Library Management | 2 | 08-21-2017 01:54 AM |
Title language of added books | panovvladislav | Calibre | 2 | 03-25-2012 06:50 AM |
ADD Books & extract tags from title? | johnb0647 | Calibre | 3 | 01-08-2011 05:36 PM |
Metadata extract from Title | 507Tuli | Calibre | 14 | 05-29-2009 03:13 AM |