![]() |
#91 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jun 2009
Device: Kindle and soft on iOS
|
Quote:
|
|
![]() |
![]() |
#92 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Hi,
Its fixable but not just a bug in Mac OS X. Your test case actually has a valid opf. The bug happens when Sigil passes the contents of the file as a full unicode string to sigil_bs4 which doesn't seem to detect that it is full unicode properly because it gets confused by the xml utf-8 header that is at the top of the contents that are passed in. If I modify the sigil_bs4/builder/_lxml.py to hard code the encoding to full unicode and remove the xml header before we pass it in, the lxml based xml parser all works. Or alternatively, if I encode it the data to utf-8 and keep the xml header, and pass it as bytes, things will work as well. The sigil_bs4 code seems to take the length of the data passed in BEFORE it converts it to final form (in this case utf-8), and then feeds that to the lxml parser and runs out of full unicode chars before the end of the file (due to the long dc:description which has many utf-8 bytes per char compared to the number of full unicode chars. So I can fix this, I just need to figure out what is best for xml files that are pased to python as full unicode before they are handed off to code that does the parsing in sigil_bs4/lxml. It would be a shame to convert from full unicode to utf-8 and then back again for no reason. I will look into the problem and get a fix today some time. Take care, KevinH |
![]() |
Advert | |
|
![]() |
#93 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Fix for wrong spine order bug
Hi,
I just pushed the fix for this to master. I have attached the fixed xmlprocessor.py in case anyone wants to play around with it. After unzipping it, you place it inside Sigil's python3lib to replace its earlier version. this fix is useful to all platforms running Sigil 0.8.900 and it will appear in the next release. To test this fix, you need to unzip the attached xmlprocessor.py.zip and then add the resulting xmlprocessor.py to Sigil's python3lib folder. On a Mac, it can be found here: /Applications/Sigil.app/Contents/python3lib/ If you are not good with command lines then do the following: 1. Open Your Applications folder 2. Right click on Sigil.app and choose "Show Package Contents" 3. Open the Contents folder 4. Open python3lib 5. Copy the new xmlprocessor.py to replace its namesake. Please give this a try and verify this fix does the job for you. Thanks, KevinH |
![]() |
![]() |
#94 | |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jun 2009
Device: Kindle and soft on iOS
|
Quote:
|
|
![]() |
![]() |
#95 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Apr 2015
Location: Ontario, Canada
Device: iPad
|
"Tools > Delete Unused Media Files" Not Working Properly?
I have installed Sigil-0.8.900-Windows-x64-Setup.exe on my Windows 7 Ultimate PC.
I have two text files Cover.xhtml and TitlePage.html in an ePub, both are the exact same code with just the name of the .JPG file changed and the file dimensions changed. But, when I run Tools > Delete Unused Media it tells me that titlepage.jpg can be deleted, so assuming the program thinks it is not in use. (See attached screen crop showing the exact code being used and the window showing that the file that is in the code can be deleted) I have tried this one two different ebooks, and I get the SAME result. Yet, when I run the SanityCheck EPUB, it reports No Problems. This worked with the previous version I had installed (Sigil-0.8.7-Windows-x64-Setup.exe). |
![]() |
Advert | |
|
![]() |
#96 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Sanity check just checks for well formed xhtml. It does not check links or anything else. If you want to do that use the now external flightcrew plugin.
Also there is a bug (fixed now in master) that allowed the content.opf to be incomplete. Is your xhtml file that uses that image actually in the content.opf tag? Simply open it and take a look? What does that report? KevinH Last edited by KevinH; 10-03-2015 at 03:41 PM. |
![]() |
![]() |
#97 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,576
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I think the problem is that the "Delete Unused Media" tool shouldn't be reporting that image as unused. I can't seem to duplicate the problem though.
Can you attach a small (uncopyrighted) sample epub that exhibits this behavior? EDIT: Oops! I'm running a developer build, I'd better try to duplicate it using the 0.8.900 release ![]() Last edited by DiapDealer; 10-03-2015 at 03:54 PM. |
![]() |
![]() |
#98 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
If the xhtml file that linked to that jpeg never got put properly in th opf manifest, it would make that image "unused" according to the spine/manifest. I was trying to rule that bug out as it is caused by broken xmlprocessor.py, otherwise its a new bug.
Kevin |
![]() |
![]() |
#99 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,576
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I haven't been able to duplicate it yet with either version. Any advice on how to go about getting into an unmanifested image scenario? |
|
![]() |
![]() |
#100 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Try V_x's test case posted earlier in thi thread.
|
![]() |
![]() |
#101 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It amazes me the number of folk that eschew the use of the tools that make tasks simple (and valid) or try and trick things into their way |
|
![]() |
![]() |
#102 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 122
Karma: 130628
Join Date: Aug 2015
Location: Athens, Greece
Device: Kobo Aura 6'', Kobo Aura H2O, Kobo Glo HD
|
The Sigil 0.8.9 causes me a lot of crashes on Windows 7 x64...
My only solution is to roll back to 0.8.6... I'm the only person with this problem? |
![]() |
![]() |
#103 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,576
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
No, you're not the only one. If you read the thread, there were several people who were experiencing and reporting crashes in 0.8.900. Most--if not all--of those bugs have been fixed. There's just been no new release with the fixes yet.
|
![]() |
![]() |
#104 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 122
Karma: 130628
Join Date: Aug 2015
Location: Athens, Greece
Device: Kobo Aura 6'', Kobo Aura H2O, Kobo Glo HD
|
Quote:
The 0.8.6 suite me fine and I'll stay with this until the bugs of 0.8.9 is fixed! ![]() |
|
![]() |
![]() |
#105 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,769
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Hi,
If you look at the content.opf tab you will see that the files that contains a link to this jpeg are not listed due to a bug in how the content.opf is parsed. The missing entries in the manifest cause the image file to appear as unused even tough it is in one of the files. I can recreate this exact behaviour with the test case lancelot epub posted earlier in this thread. With current Sigil Master which has the fixed xmlprocessor.py (this fixed xmlprocessor.py was also posted earlier in this thread), this problem can not be recreated any longer. Thank for your bug report. This is a known bug with a known fix. A Sigil 0.8.901 with all of these bug fixes should be released soon after we run some more robustness tests on it (assuming there are no other outstanding bug reports). Thanks, KevinH Quote:
|
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Plugin Features in the upcoming Sigil 0.8.900 | KevinH | Plugins | 6 | 09-14-2015 02:48 PM |
Sigil 0.8.0 Released | user_none | Sigil | 126 | 10-11-2014 07:52 PM |
Sigil 0.7.1 Released | user_none | Sigil | 64 | 03-26-2013 10:02 PM |
Sigil 0.4.2 Released | user_none | Sigil | 41 | 10-26-2011 06:03 AM |
Sigil 0.4.1 Released | user_none | Sigil | 50 | 09-01-2011 04:58 PM |