Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-26-2021, 08:30 PM   #1
bounce
Zealot
bounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavens
 
Posts: 132
Karma: 13892
Join Date: Mar 2010
Device: Ipad, Kindle 7
Keep the full file name and not add "unknown" ?

Hi,

I'm trying to convert some files and the title of the text and the author are already in the file name (title - author). I'd like to keep the full file name after conversion and not add "unknown" as the author.

The way it's set for conversion now, part of many author's names at end of the file name are being cut off by Calibre and I need to be able to search their last names to pull them up. I don't care about any metadata.

Calibre has a lot of settings and I'm not sure where to look?
bounce is offline   Reply With Quote
Old 08-26-2021, 08:55 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,373
Karma: 74317822
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
See if https://manual.calibre-ebook.com/gui...ename-metadata helps

It describes how to extract data from the file name when initially adding content to calibre.

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Advert
Old 08-26-2021, 10:10 PM   #3
bounce
Zealot
bounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavens
 
Posts: 132
Karma: 13892
Join Date: Mar 2010
Device: Ipad, Kindle 7
Thanks, I'd been reading the manual, experimenting for hours with settings, and still can't make heads or tails of how to do it. Surely, I don't have to learn regex expressions to preserve the full file name on conversion and not add "unknown"?

In preferences: I'd already had "Read metadata from file contents instead of file name" checked to off.

I've also been reading another thread similar to what I wanted to do (keep full file name and don't add "unknown" author) and they mentioned to uncheck read metadata from file contents and to also:

1. Open Preferences
2. In Preferences, choose Adding Books (in the Import/export section)
3. In Adding Books, uncheck "Read metadata from file contents rather than file name"
4. In the "Configure metadata from filename box", there is a drop down menu under Regular expression. Choose (?P<title>.+)
5. Click Apply, close Preferences and you are done.

Another change I made was to stop Calibre from appending "- Unknown" to the end of all my filenames (e.g., "the author"):

Go to Preferences, "Sending books to devices":
Change "save template" to {author_sort}/{title}

I'd done all of the above and I'm still getting "unknown" added to the file name and the original full file names are still being cut off.

Last edited by bounce; 08-26-2021 at 10:25 PM. Reason: added
bounce is offline   Reply With Quote
Old 08-26-2021, 11:55 PM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,373
Karma: 74317822
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Rather than just selecting "(?P<title>.+)" which just assigns the Title and leaves Author as Unknown, try using "(?P<title>.+) - (?P<author>[^_]+)" which will set both Title AND Author.

You can test it by putting a file name in the field labelled "File n<"ame" and pressing the Test button.
PeterT is offline   Reply With Quote
Old 08-27-2021, 12:47 PM   #5
bounce
Zealot
bounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavens
 
Posts: 132
Karma: 13892
Join Date: Mar 2010
Device: Ipad, Kindle 7
That expression was default wasn't it? I'd tried that initially with "Read metadata from file contents instead of file name" unchecked.

Just tried it again and it added unknown file name. Is there a setting besides in adding preferences of Calibre that needs to be changed? Pretty sure this is happening when adding though because you can see in the pic (might have to full screen it), the Calibre folder the original Markdown file has "unknown" added and so does the converted text file.

https://www.dropbox.com/s/h68nr5rxsy...%20AM.png?dl=0

Last edited by bounce; 08-27-2021 at 12:49 PM. Reason: pic
bounce is offline   Reply With Quote
Advert
Old 08-27-2021, 03:35 PM   #6
McStubb
Connoisseur
McStubb began at the beginning.
 
Posts: 51
Karma: 10
Join Date: May 2014
Device: None
Its a matter of selecting read data from filename and then configuring the <title> -<author> regular expression to collect the data you need while importing it into calbre
McStubb is offline   Reply With Quote
Old 08-27-2021, 05:12 PM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,373
Karma: 74317822
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Remember this only applies when adding content. Also did you try pasting one of your filenames into the text box and hitting the test button?

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Old 08-27-2021, 06:47 PM   #8
bounce
Zealot
bounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavensbounce is a rising star in the heavens
 
Posts: 132
Karma: 13892
Join Date: Mar 2010
Device: Ipad, Kindle 7
Actually, I figured it out. My files didn't have a hyphen between title and author. They were title "by" author. Thanks for the reply and hth someone
bounce is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a new format to "add an empty file..." ownedbycats Calibre 4 07-19-2020 11:20 AM
V3 "Feature" Full Screen Add Book Dialog johnelle Library Management 3 08-11-2017 02:43 PM
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM
"Add new format" to text file without extension myudkowsky Calibre 4 11-25-2010 02:00 PM


All times are GMT -4. The time now is 07:16 AM.


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