← Back to team overview

calibre-devs team mailing list archive

feeds2* OPF bug

 

Hi Kovid:

The poster doesn't seem to have opened a ticket (yet?), but I took a
look at the issue mentioned in this mobileread thread:

    http://www.mobileread.com/forums/showthread.php?t=38124

The problem is that the OPF handed to oeb2mobi lists all the files with
'.cfm' extensions (ColdFusion something?) as @media-type
'application/octet-stream'.  That seems to be happening because
metadata.opf2 generates the @media-type purely from file extensions.
I'm not sure how to solve this.  To my mind the most-correct thing to do
would be to set a proper @media-type to start with, but metadata.opf2
doesn't allow that.  I tried having OEBBook use libmagic on anything
with application/octet-stream, which works, but is kind of gross and
introduces yet another dependency.  Perhaps just have rename all the
downloaded files to have ".html" extensions? but I'm not familiar enough
with the feeds code to know what the repercussions of that would be.
Maybe just leave this one unsolved until 0.5?

This also revealed a regression in Stylizer's handling of bad CSS in
@style attributes.  I could have sworn I'd fixed that one already, but
I've pushed a fix up into 'staging'.

-Marshall



Follow ups