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-11-2019, 09:16 AM   #46
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Not syncing epub3 ncx was done by design as the nav is primary in those cases.
Fair enough. I'm just confused as to why that change happened in 0.9.991 when the nav has been primary since 0.9.16 (and the ncx was syncing in EPUB3 as recently as 0.9.18).
DiapDealer is offline   Reply With Quote
Old 11-11-2019, 09:25 AM   #47
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
It should have changed when we moved away from requiring ncx in epub3. At least that was the plan!

The same template hard coding bug exists in the nav creation code as well. We will need to have pre-calculated the bookpath of the ncx and the bookpath of the first xhtml file, under epub2. For epub3, we need to pre-calculate the bookpath of the nav, the bookpath of the first xhtml file, and the bookpath of the nav css file, so that the template can be used again.

I will look into doing that.

KevinH
KevinH is offline   Reply With Quote
Advert
Old 11-11-2019, 09:29 AM   #48
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Similar problem exist for epub3.
Use custom layout (other than "Text" and "Styles") and hardcoded folder names in nav file are not updated.

File: src\BookManipulation\Book.cpp (empty nav)

Edit: @KevinH was faster
BeckyEbook is online now   Reply With Quote
Old 11-11-2019, 09:36 AM   #49
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by odamizu View Post
QUESTION: I understand KevinH and DiapDealer went to great lengths to enable Sigil to accept and handle any epub structure. Is there an advantage to leaving the epub in its original non-Sigil-standard structure?
Restructuring can be invasive, and there's always potential for some sort of breakage. Granted, that will be rare, but the possibility is still there. Think javascript coded in such a way that hard-coded paths and folder structures are relevant. Files with identical names, but it in different subfolders, should be safely renamed when restructured, but that renaming is still invasive and could potentially break something.

But if you're just using Sigil to edit typical novels there's probably no real advantage to leaving alternatively structured epubs as they are (aside from less processing and altering of the original in general)

Quote:
Originally Posted by odamizu View Post
Is there any reason that I should not use the Tools > Restructure Epub to Sigil Norm as soon as I load an epub into Sigil as part of my workflow now?
Assuming we haven't broken anything major with the new Restructure tool, then no, there's no reason (other than the ones already mentioned above, that is).
DiapDealer is offline   Reply With Quote
Old 11-11-2019, 09:42 AM   #50
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
One more: create an index and it will have wrong paths immediately (of course only for files with custom layout).

File: IndexHTMLWriter.cpp
BeckyEbook is online now   Reply With Quote
Advert
Old 11-11-2019, 09:53 AM   #51
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
It should have changed when we moved away from requiring ncx in epub3. At least that was the plan!
That's what I thought, too! But 0.9.16 through 0.9.18 all seem to sync the optional ncx (file renames anyway--you still need to regenerate the ncx after additions/deletions/splits/merges, etc...) after it's added to an EPUB3 (and 0.9.16 was the first version where the ncx wasn't enforced on EPUB3s).

I understand if it was too difficult to maintain that syncing after the massive overhaul that was 0.9.991, but I'd hate to think we accidentally "turned off" something that would still work (even if it wasn't entirely necessary) if we but let it.

But this isn't critical, either. There are many things that make it necessary to regenerate the optional ncx after the nav changes anyway.

Last edited by DiapDealer; 11-11-2019 at 09:56 AM.
DiapDealer is offline   Reply With Quote
Old 11-11-2019, 10:33 AM   #52
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
The use of templates to fill in empty nav and empty ncx should now be fixed with my last commits to master.

If you have a good test case please give it a try.

KevinH
KevinH is offline   Reply With Quote
Old 11-11-2019, 10:43 AM   #53
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, it too has a hard coded template but even worse the links it builds are broken for non-standard epubs so we will need to rework IndexCreation a lot more.

I am on it.

Thanks!

KevinH

Quote:
Originally Posted by BeckyEbook View Post
One more: create an index and it will have wrong paths immediately (of course only for files with custom layout).

File: IndexHTMLWriter.cpp
KevinH is offline   Reply With Quote
Old 11-11-2019, 11:16 AM   #54
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
The use of templates to fill in empty nav and empty ncx should now be fixed with my last commits to master.

If you have a good test case please give it a try.

KevinH
What I'm seeing:

1) Your changes fixed the issues with syncing non-standard EPUB2s (the ncx is updated when a file is renamed in Book Browser)

2) When renaming files in Book Browser in a standard EPUB3 your changes restored the ability update an optional ncx that is added.

3) Custom EPUB3 structures now keep the NAV synced so long as the nav.xhtml file is in the same folder as the xhtml files. If it's in a different location, it won't. I don't know if the NAV is allowed to be in a different folder or not, to tell the truth. If not we need to take away the ability to be able to create one anywhere other than the default xhtml virtual group location, I think. If it can be placed elsewhere, then there's still breakage in the ability to properly sync somewhere.

4) The NCX generation tool for EPUB3 does not honor the default custom defined structure and always creates it as OEBPS/toc.ncx. It's easily moved, of course, but still... Non-standard EPUB3s never keep the ncx in sync with renamed files.

Last edited by DiapDealer; 11-11-2019 at 12:25 PM.
DiapDealer is offline   Reply With Quote
Old 11-11-2019, 12:00 PM   #55
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
Hi DiapDealer,

Quote:
3) Custom EPUB3 structures now keep the NAV synced so long as the nav.xhtml file is in the same folder as the xhtml files. If it's in a different location, it won't. I don't know if the NAV is allowed to be in a different folder or not, to tell the truth. If not we need to take way the ability to be able to create one anywhere other than the default xhtml virtual group location, I think. If it can be placed elsewhere, then there's still breakage in the ability to properly sync somewhere.
A definite bug. The nav can be anywhere and we need to support that. When you get a free moment would you please email me a epub testcase and exact steps to see this on my machine?

Quote:
4) The NCX generation tool for EPUB3 does not honor the default custom defined structure and always creates it as OEBPS/toc.ncx. It's easily moved, of course, but still... Non-standard EPUB3s never keep the ncx in sync with renamed files.
Yes another bug! A testcase epub would be nice if it is not a problem.

Thanks

KevinH
KevinH is offline   Reply With Quote
Old 11-11-2019, 12:02 PM   #56
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I committed a potential fix to this issue, but it had to touch a number of files so it may not be fully working yet.

So would you please rebuild and test your Index generation issue once again.

Thanks!

KevinH

Quote:
Originally Posted by BeckyEbook View Post
One more: create an index and it will have wrong paths immediately (of course only for files with custom layout).

File: IndexHTMLWriter.cpp
KevinH is offline   Reply With Quote
Old 11-11-2019, 12:13 PM   #57
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
I'm testing.

After create index in file index.css is only "index.css" text (instead of styles)
BeckyEbook is online now   Reply With Quote
Old 11-11-2019, 12:50 PM   #58
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: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, my mistake. Replaced too much of the code and confused strings since one is not available in MainWindow only Book.

I have tried to fix my mistake.

Would you please give it one more try?

Thanks,

KevinH


Quote:
Originally Posted by BeckyEbook View Post
I'm testing.

After create index in file index.css is only "index.css" text (instead of styles)
KevinH is offline   Reply With Quote
Old 11-11-2019, 01:25 PM   #59
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
A definite bug. The nav can be anywhere and we need to support that. When you get a free moment would you please email me a epub testcase and exact steps to see this on my machine?
An epub won't be very useful since it's basically already broken. But that's sort of the point. The Create a Custom Empty Epub tool is creating a broken empty EPUB3 (or at least it can).

Steps to recreate:
** Make sure your default empty EPUB version is set to EPUB3 **
1) open Sigil.
2) start the "Create a Custom Empty Epub" tool
3) add markers for OPF file, NAV File, Style Files, and Image Files directly in EpubRoot
4) add an "xhtml" folder to EpubRoot
5) add a marker for Xhtml Files in the "xhtml" folder
6) click OK (it doesn't matter if you say yes or no to the prompt to save the structure as default).
7) Double-click on nav.xhtml in the Book Browser and note the incorrect href for "Section0001.xhtml" (or run the EpubCheck plugin and note the "'Section0001.xhtml' could not be found in the EPUB" error).

Last edited by DiapDealer; 11-11-2019 at 01:39 PM.
DiapDealer is offline   Reply With Quote
Old 11-11-2019, 01:38 PM   #60
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: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Yes another bug! A testcase epub would be nice if it is not a problem.
Steps to recreate:
** Make sure your default empty EPUB version is set to EPUB3 **
1) open Sigil.
2) start the "Create a Custom Empty Epub" tool
3) create a flat structured epub with all required markers directly in EpubRoot; no folders
4) add an NCX file marker to EpubRoot
5) click OK (it doesn't matter if you say yes or no to the prompt to save the structure as default).
6) Run Tools->Epub3 Tools->Generate NCX/Guide for epub2 e-readers
7) Use the tooltip in the Book Browser (or Reports) to note the location of the toc.ncx file.

As I mentioned, it's not a big deal to move the toc.ncx out of the unwanted OEBPS folder, but it would be nice if it was added where the marker for it was placed in the Create a Custom Empty Epub tool.


I see a recent commit that looks like it may have already addressed this. I'll try it out. Thanks!

Last edited by DiapDealer; 11-11-2019 at 01:56 PM.
DiapDealer 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 03:24 PM.


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