View Single Post
Old 10-06-2020, 10:29 PM   #927
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
KFX PI seems to add a space in the title

I have a calibredb VBS script to copy my database epubs to a single folder in KFX format. Everything works fine unless there's a series. Then there's an extra space that comes from somewhere and messes up the titles in the Kindle index/home page.

A 'normal' conversion done within the GUI works fine, but the series and the series index aren't part of the file name. I did a conversion debug folder and everything was as expected.

The file name is OK:

Adam Hall-Quiller[01]-Quiller Memorandum, The.kfx

but the title (which is apparently what the Kindle uses to display is

Quiller[01 ]Quiller Memorandum, The.kfx

space before the series ] and no hyphen

I really just need (want) the Kindle title to be like the filename; makes it easier to sort and find things

My script template:

Code:
sCommandLine = "export --progress --all --dont-save-cover --dont-write-opf --format kfx"
sCommandLine = sCommandLine & " --single-dir --template ""{authors}-{series}{series_index:0>2s|[|]-}{title}"" --to-dir "
sCommandLine = sCommandLine & """" & sDestination & """"

Call RunProgram ("calibredb", sCommandLine, 1)
Double quotes required to get a single quote, and the Destination folder might have spaces in it so it is bracketed by quotes also

There's no spaces that I can see in the epub data, and since the template is making the file name correctly, I'm thinking that it's the PI that is inserting the space

I didn't know any way to view KFX metadata, so this was the best I could do

Maybe my template is wrong, or I'm misunderstanding how the PI is supposed to generate a title
Attached Thumbnails
Click image for larger version

Name:	KFX.JPG
Views:	183
Size:	69.2 KB
ID:	182516   Click image for larger version

Name:	ePub.JPG
Views:	173
Size:	130.5 KB
ID:	182517   Click image for larger version

Name:	KFX2.JPG
Views:	179
Size:	67.8 KB
ID:	182518   Click image for larger version

Name:	KFX3.JPG
Views:	167
Size:	60.4 KB
ID:	182519  

Last edited by phossler; 10-07-2020 at 10:07 AM. Reason: Correction: There's no author in the Title field
phossler is online now   Reply With Quote