Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-15-2019, 07:37 PM   #136
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
No Sigil in 2011 simply ignored the incorrect mimetype and forced everything based on the file extension. This approach does not work for generic .xml files and some other files that can represent a number of possibly different media-types.

Sigil now, just like in web browsers treats the media type as important and that does determine how a file is displayed or processed.

I will change Sigil's code to look up the media-type from the manifest item and if that is not recognized, then (assuming the extension is not ".xml") look up the media-type via the file extension.

I will also hard code the bookpath to match the epub zip even if a file's type and mediatype are not recognized.

Thanks for testing.

KevinH

Last edited by KevinH; 11-15-2019 at 07:44 PM.
KevinH is offline   Reply With Quote
Old 11-15-2019, 07:43 PM   #137
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by snarkophilus View Post
Not sure what to suggest for a fix. Sigil used to be able to edit this, at least in 2011 .

Here's the relevent entries for the fonts in Three Men In A Boat:
Code:
    <item id="fontinbold_font" href="fonts/Fontin-Bold.ttf" media-type="application/x-truetype-font"/>
    <item id="fontinitalic_font" href="fonts/Fontin-Italic.ttf" media-type="application/x-truetype-font"/>
        <item id="fontinregular_font" href="fonts/Fontin-Regular.ttf" media-type="application/x-truetype-font"/>
Yes x-truetype-font is not the correct mediatype either. There are many acceptable mediatypes for truetype fonts but that is not one of them (x-font-ttf, x-font-ttc, font/ttf, etc.) Multiple valid entries exist for otf fonts as well.

They are recognizable so I can add them as even more equivalents to the long list we already recognize.
KevinH is offline   Reply With Quote
Advert
Old 11-15-2019, 08:16 PM   #138
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by KevinH View Post
They are recognizable so I can add them as even more equivalents to the long list we already recognize.
I've no idea how you implement this growing list, but is there ever a case where it would be useful for a user to be able to configure something to add to the list so that they could deal with a funny mime type without having to report a bug and wait for an update/release?
snarkophilus is offline   Reply With Quote
Old 11-15-2019, 09:13 PM   #139
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
Wouldn't it just be easier to edit the OPF and replace the broken mediatype?

FWIW, There is actually a core limited set of mediatypes that epub3 may use (see the epub3 spec) without supplying an alternative file. We already cover those covered by the spec.
KevinH is offline   Reply With Quote
Old 11-15-2019, 09:27 PM   #140
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by KevinH View Post
Wouldn't it just be easier to edit the OPF and replace the broken mediatype?
Hah, I obviously didn't think that through (or well and truly over-thought it!). Yes, just changing the media type seems much easier.
snarkophilus is offline   Reply With Quote
Advert
Old 11-15-2019, 09:36 PM   #141
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,789
Karma: 6000000
Join Date: Nov 2009
Device: many
Okay, I just now pushed a fix to master to try to harden Sigilaginst unrecognized mediatypes.

I can not use the Three Men in a Boat to test it as I have added those font mimetypes so that they are now recognized.

So after the appveyor build completes, would you please grab it and test it with your 2011 epub and let me know if I have succeeded or still have more work to do.

Thanks,

KevinH

I am a bit worried about your page-template file as it does use a recognized mediatype just not the proper mediatype for that file so we may still have issues with that one.
KevinH is offline   Reply With Quote
Old 11-16-2019, 12:04 AM   #142
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by KevinH View Post
Okay, I just now pushed a fix to master to try to harden Sigilaginst unrecognized mediatypes.

I can not use the Three Men in a Boat to test it as I have added those font mimetypes so that they are now recognized.

So after the appveyor build completes, would you please grab it and test it with your 2011 epub and let me know if I have succeeded or still have more work to do.

Thanks,

KevinH

I am a bit worried about your page-template file as it does use a recognized mediatype just not the proper mediatype for that file so we may still have issues with that one.
I tested with both -29 and a -30 that showed up a little later. Both Three Men In A Boat (as expected as you said) and my other epub open now and work properly. The other epub still says

Code:
Debug: Warning: unrecognized mediatype in OPF:  "txt/css"
but there are no warnings about the page-template file.

To be honest, I've no idea what that page-template file actually does. I tinkered with a few margins mentioned in that file and nothing seemed to change in the Sigil preview window. Don't care what it does, happy I can open the epub now .

Thanks very much for your work on this and the other tab closing issue!
snarkophilus is offline   Reply With Quote
Old 11-16-2019, 12:15 AM   #143
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by snarkophilus View Post
but there are no warnings about the page-template file.
Well ... if I rename another file within that epub, then I get the attached message. Sigil keeps working, other that the pop-up everything else works. I expect that's related to updating/changing the contents.opf?
Attached Thumbnails
Click image for larger version

Name:	image-20191116-160833.png
Views:	123
Size:	3.4 KB
ID:	174963  
snarkophilus is offline   Reply With Quote
Old 11-16-2019, 06:37 AM   #144
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
There's a problem with changing the target of a TOC entry in the TOC editor.
  • Choose: Tools -> Table of Contents -> Edit table of contents ...
  • Pick any entry in the TOC
  • Click "Select Target"
  • segfault
The segfaults every time I've tried it in a number of epubs, including my sample 50 little image epub, a Calibre news recipe and "normal" books.

Maybe I should change my profile blurb to "I break things"?
snarkophilus is offline   Reply With Quote
Old 11-16-2019, 06:58 AM   #145
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by snarkophilus View Post
There's a problem with changing the target of a TOC entry in the TOC editor.
I was able to re-create this bug on my Windows 10 machine with standard and non-standard epubs.
Doitsu is offline   Reply With Quote
Old 11-16-2019, 07:25 AM   #146
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,587
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by snarkophilus View Post
Maybe I should change my profile blurb to "I break things"?
Better to find them in the alpha and beta releases, than in the official 1.0 release. Feel free to keep on "breaking" things in 0.9.991.

Does it happen with both EPUB2 and EPUB3?

Last edited by DiapDealer; 11-16-2019 at 07:27 AM.
DiapDealer is offline   Reply With Quote
Old 11-16-2019, 07:35 AM   #147
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by DiapDealer View Post
Better to find them in the alpha and beta releases, than in the official 1.0 release. Feel free to keep on "breaking" things in 0.9.991.
I'll keep editing and report things that break. Maybe if I can't find a problem on any given day I'll try harder to do random stuff.

Quote:
Does it happen with both EPUB2 and EPUB3?
I think I may have an epub3 or two or three if I looked hard enough, but I've only tried with epub2.
snarkophilus is offline   Reply With Quote
Old 11-16-2019, 07:37 AM   #148
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Does it happen with both EPUB2 and EPUB3?
It happens with standard and non-standard EPUB2 and EPUB3 books.
Doitsu is offline   Reply With Quote
Old 11-16-2019, 08:05 AM   #149
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,587
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Any sign of the selection dialog trying to appear after clicking Select Target, or is the segfault immediate?
DiapDealer is offline   Reply With Quote
Old 11-16-2019, 08:17 AM   #150
snarkophilus
Wannabe Connoisseur
snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.snarkophilus ought to be getting tired of karma fortunes by now.
 
Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
Quote:
Originally Posted by DiapDealer View Post
Any sign of the selection dialog trying to appear after clicking Select Target, or is the segfault immediate?
No sign of the selection dialog. For me, I get the dreaded little Windows spinny circle of death for maybe 5 seconds, then the segfault message.
snarkophilus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
5.8.11 Pre=release knc1 Kindle Developer's Corner 21 04-17-2018 08:42 PM
Overdrive - Search for Pre-Release nynaevelan General Discussions 11 11-24-2013 02:27 PM
Where are the pre-release purchase buttons? Sydney's Mom General Discussions 8 09-06-2012 10:57 PM
KF Android 4.0 Pre-Release Version robertc88 Kindle Fire 22 01-22-2012 07:24 PM
PDF Viewer 0.3.0 pre-release pruss Android Devices 62 11-22-2011 11:18 AM


All times are GMT -4. The time now is 09:24 PM.


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