Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibre has problems with three dots in image filenames #46

Closed
dteviot opened this issue Jul 11, 2016 · 8 comments
Closed

Calibre has problems with three dots in image filenames #46

dteviot opened this issue Jul 11, 2016 · 8 comments

Comments

@dteviot
Copy link
Owner

dteviot commented Jul 11, 2016

Reported by dreamer2908

Ugh, apparently Calibre has problems with three dots in image filenames if I enable --smarten-punctuation option. Maybe I should report it to them when I stop being lazy.

Maybe replace the three dots (which are supposed to indicate an elipsis) with something else. Not sure what would be best. Some options are:

  • underscore(s)
  • hyphen(s)
  • maybe '-xxx-'
@toshiya44
Copy link

Underscrores, single hyphen or -xx- will do. (there might be some issue with multiple hyphens, so it's best avoid that)

@dreamer2908
Copy link

dreamer2908 commented Jul 11, 2016

The --smarten-punctuation option in Calibre ebook converter converts plain quotes, dashes and ellipsis to their typographically correct equivalents.

Apparently, it doesn't skip all tags, so three dots ... becomes ellipsis glyph u2026. Actual images aren't renamed, so it can't find the referenced file.

I ran ebook-convert (Calibre ebook converter CLI) a few times and here is the console output: http://pastebin.com/9qPeRdsP

In the first run, --smarten-punctuation was on. It couldn't find the images. In the output, images got replaced with big blue question marks: https://i.imgur.com/UeB5ffb.png . Well, it's weird that it could find the cover image just fine.

In the second run, without --smarten-punctuation, it had no problem. The output is normal: https://i.imgur.com/XYqscv9.png

In the third and fourth runs, I edited the epub file in Sigil, and renamed images: three dots into two dots, a single dot, one/two hyphens, underscore, -xxx-, single quotes, etc. --smarten-punctuation was on, but it had no problem.

It seems that it only has problems with three dots. Underscores would be the safest, I guess.

@dteviot
Copy link
Owner Author

dteviot commented Jul 12, 2016

@dreamer2908
That's a really detailed analysis.
Sounds like it is a bug in Calibre. As you say, it's renaming the tags.

I note this in the Calibre output, looks like I have more work to do.

The cover image has an id != "cover". Renaming to work around bug in Nook Color

@belldandu
Copy link
Collaborator

belldandu commented Jul 12, 2016

Hrm thanks @dreamer2908 @toshiya44 for this detailed bug report. I agree with the -xxx- replacement for ... although calibre should REALLY not be doing this so someone should report this to calibre as a bug. Please feel free to link to this issue if you need to.

@dteviot Yeah fun.

Also i might be away for a few days because of joining the navy (for several reasons) But i'll do my best to keep up with stuff.

I suggest possibly making an option in #14 for this instead of doing it by default.

@dteviot
Copy link
Owner Author

dteviot commented Jul 12, 2016

@dreamer2908
Logged bug with Calibre team.
https://bugs.launchpad.net/calibre/+bug/1602100

You may want to add OS and Calibre version.

@dreamer2908
Copy link

The bug is said to have been fixed last week: https://bugs.launchpad.net/calibre/+bug/1598465

I've checked out the latest version 2.62.0 and it seems to have no problem with three dots. Good, good.

@belldandu
Copy link
Collaborator

@dteviot @dreamer2908 awesome

@belldandu
Copy link
Collaborator

If there are no further issues i'm going to close this for now since calibre no longer seems to have this issue.

If you need this issue reopened then just @ me in a comment on this issue and i will reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants