Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2019, 11:47 PM   #1
rebeltaz
Connoisseur
rebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enough
 
rebeltaz's Avatar
 
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?
rebeltaz is offline   Reply With Quote
Old 07-26-2019, 02:47 AM   #2
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is offline   Reply With Quote
Advert
Old 07-26-2019, 11:19 AM   #3
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by BetterRed View Post
...
My favourite Windows renamer is Bulk Rename Utility - mainly because I've been using it since the year dot

BR
+1

BulkRenameUtility has been in my "tool kit" for ages. It's a very powerful tool.
dwig is offline   Reply With Quote
Old 07-26-2019, 12:17 PM   #4
rebeltaz
Connoisseur
rebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enough
 
rebeltaz's Avatar
 
Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
Quote:
Originally Posted by BetterRed View Post
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
I run linux and when I need to bulk rename, depending on the complexity if the situation, I either use the command line sed or rename or I'll use the GUI krename.

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.
rebeltaz is offline   Reply With Quote
Old 07-26-2019, 06:54 PM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is offline   Reply With Quote
Advert
Old 07-26-2019, 07:18 PM   #6
rebeltaz
Connoisseur
rebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enough
 
rebeltaz's Avatar
 
Posts: 92
Karma: 536
Join Date: Apr 2011
Device: Entourage Pocket eDge
Quote:
Originally Posted by BetterRed View Post
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
I know Calibre copies them to it's own library. I keep these books in their own original directories, with my own structure and naming conventions mostly as backup. I really only use calibre when transferring books to and from ereaders, though. If I need to access an ebook on my computer, it's just as quick for me to just use a file browser as it is to load calibre.

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
rebeltaz is offline   Reply With Quote
Old 07-26-2019, 08:05 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by rebeltaz View Post
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
Which is why I made this suggestion:

Quote:
Originally Posted by BetterRed View Post
. . . create a folder of hardlinks, massage those filenames as described, upload to calibre, delete the hardlinks . . .
You could add a twist, create the hardlinks in calibre's designated autoadd folder, and then it will delete the hardlinks. I've not tested that on Linux.

BR
BetterRed is offline   Reply With Quote
Old 07-26-2019, 08:15 PM   #8
rebeltaz
Connoisseur
rebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enoughrebeltaz will become famous soon enough
 
rebeltaz's Avatar
 
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.
rebeltaz is offline   Reply With Quote
Old 07-27-2019, 05:10 PM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:30 PM.


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