Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-06-2019, 10:37 AM   #16
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: 20,734
Karma: 112092388
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
For the purposes of this discussion, I really think we should separate #1from #2 & #3. In other words: "how do we want to treat #2 & #3?" And then "how do want to treat #1?"

Lumping them together only creates confusion, I think. Especially in light of the fact that I think #1 is a no-brainer: make it a manual menu option (so people can validate without having to save first), AND automate it upon Save(As), if feasible (because having manifest properties properly set is not an optional part of the spec, and properly setting them will never cause problems).

That leaves #2 and #3. Which I think should be combined into one, backward-compatibility action, and should be optional. Whether it's optional because it's left as a manual menu-action only, or because the user can opt out of automatically having them happen upon Save(As) makes no difference to me.

Last edited by DiapDealer; 07-06-2019 at 12:25 PM.
DiapDealer is online now   Reply With Quote
Old 07-06-2019, 11:49 AM   #17
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
We could easily combine 2 and 3 into a single "backwards compatibility" option.
I still need to study the code to see if making the ncx totally optional under epub 3 would be easy. Much of the earlier code required it (before epub3).

I will merge 2 and 3 into a single routine and change the menu in master. Something like:

- Generate NCX and Guide for backwards compatibility

Last edited by DiapDealer; 07-06-2019 at 12:27 PM.
KevinH is offline   Reply With Quote
Advert
Old 07-06-2019, 12:18 PM   #18
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
I wish Sigil had a "Publish" or "For Production" button that would run epubcheck if installed and then do the things that only need to be done once - like doing backwards compatibility, and manifest properties updating before saving the epub.
KevinH is offline   Reply With Quote
Old 07-06-2019, 12:20 PM   #19
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: 20,734
Karma: 112092388
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Thank you for understanding what I meant when I transposed the numbers. So much for eliminating confusion, huh?

I'll try to mitigate the mess of my post with some editing.

Last edited by DiapDealer; 07-06-2019 at 12:28 PM.
DiapDealer is online now   Reply With Quote
Old 07-06-2019, 01:00 PM   #20
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,796
Karma: 11946128
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by KevinH View Post
I wish Sigil had a "Publish" or "For Production" button that would run epubcheck if installed and then do the things that only need to be done once - like doing backwards compatibility, and manifest properties updating before saving the epub.
Says the guy with complete control over what Sigil does... lolz
Turtle91 is online now   Reply With Quote
Advert
Old 07-06-2019, 01:22 PM   #21
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
Would you use a menu that said "Save for Production Use"? And even if you did, how many future novice users would it just confuse?

So even though I think it would make things simple for me codewise, I really do not think it would be used.


Quote:
Originally Posted by Turtle91 View Post
Says the guy with complete control over what Sigil does... lolz
KevinH is offline   Reply With Quote
Old 07-06-2019, 02:14 PM   #22
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,796
Karma: 11946128
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
A menu item that said something like "Finalize" or "Publish" or "Push this button as the VERY LAST thing you do on this ePub" would be fairly obvious. Newbs go through a fairly short/steep learning curve when they first use Sigil anyway. I don't think that kind of a button would be hard to understand.

I'm assuming these ePub3 auto-save functions would only be a factor if you are working in ePub3...these features wouldn't even be looked at if you were still in ePub2. When I finally get around to making the switch to 3, I would like the idea of having the "finalize/publish" button rather than an auto-save feature. There are already several buttons I push in the editing process when finishing the book: spell-check, css-cleanup, Generate TOC, epubcheck...really easy to add/replace one of those with a "finalize ePub3" button.
Turtle91 is online now   Reply With Quote
Old 07-06-2019, 02:21 PM   #23
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,247
Karma: 6110931
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
Would you use a menu that said "Save for Production Use"? And even if you did, how many future novice users would it just confuse?
It would be similar to GIMP's or InDesign's "Save As" and "Export".

Personally, I just think these cause confusion for new users.

Example, GIMP always complaining about "making sure you save as xcf", when most basic users would just want to 'Save As' JPG or PNG.

Personally, I would keep all EPUB2 backwards compatibility on by default, then allow to disable in a menu option. Advanced users can disable the option if wanted, similar to Edit > Preferences > General Settings > Mend XHTML Source Code On.
Tex2002ans is offline   Reply With Quote
Old 07-06-2019, 02:22 PM   #24
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
Good points.

Yes, this discussion only impacts epub3 users. A "Finalize" button or menu would not really be needed for an epub2.

If updating the epub3 manifest properties was cheap and fast, no worries but it needs to run in a bunch of threads concurrently to ask each html resource to check its contents and report back if it does specific things.

We just have to figure out the best place to make this happen once after all changes, thus my wish for some way of knowing when it would be a good time to do this for epub3.



Quote:
Originally Posted by Turtle91 View Post
A menu item that said something like "Finalize" or "Publish" or "Push this button as the VERY LAST thing you do on this ePub" would be fairly obvious. Newbs go through a fairly short/steep learning curve when they first use Sigil anyway. I don't think that kind of a button would be hard to understand.

I'm assuming these ePub3 auto-save functions would only be a factor if you are working in ePub3...these features wouldn't even be looked at if you were still in ePub2. When I finally get around to making the switch to 3, I would like the idea of having the "finalize/publish" button rather than an auto-save feature. There are already several buttons I push in the editing process when finishing the book: spell-check, css-cleanup, Generate TOC, epubcheck...really easy to add/replace one of those with a "finalize ePub3" button.
KevinH is offline   Reply With Quote
Old 07-06-2019, 04:11 PM   #25
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
For the record, not adding an ncx resource to epub3 will take some work. FolderKeeper right now always creates it and it is the target of connect signals/slots. Having an ncx resource be present is also assumed in many places including ImportEPUB.cpp.

So we if want to relax that constraint for epub3 users, I would like to hold off on making these invasive changes until after we have a new version of Sigil (non-beta) out there, in case this change creates issues.

KevinH
KevinH is offline   Reply With Quote
Old 07-10-2019, 01:09 PM   #26
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
Okay to close off this topic: we have a new branch "optncx" which does not require epub3 epubs to have an NCX, and that uses two epub3 tools menus - one to generate an NCX and Guide from the Nav, and one to now Remove the NCX and Guide.

So no more warnings about creating an NCX on epub3 anymore, but still making it easy to edit your epub3 and before final save generating an NCX and Guide to help with backwards compatibility.

This branch is now undergoing testing. Once we know we have not broken anything we will probably merge this into master for the next release.

For some future version will can worry about making things automatic by default or not and how to let the user control that.
KevinH is offline   Reply With Quote
Old 07-10-2019, 01:38 PM   #27
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: 20,734
Karma: 112092388
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
As a result of now being able to create/open/edit/save EPUB3s without an ncx, plugin devs should make sure their EPUB3-compatible plugins test for the existence of an ncx before attempting to parse or alter it. I don't expect there will be that many, but it could potentially cause some breakage when the next version of Sigil is released.
DiapDealer is online now   Reply With Quote
Old 07-11-2019, 11:38 AM   #28
Doitsu
Wizard
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: 4,622
Karma: 14578553
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
As a result of now being able to create/open/edit/save EPUB3s without an ncx, plugin devs should make sure their EPUB3-compatible plugins test for the existence of an ncx before attempting to parse or alter it. I don't expect there will be that many, but it could potentially cause some breakage when the next version of Sigil is released.
I haven't had time to test the new "optncx" branch. Will be bk.gettocid() return None for epub3 books without toc.ncx or will it raise a custom Sigil error?
Doitsu is offline   Reply With Quote
Old 07-11-2019, 11:44 AM   #29
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Doitsu View Post
I haven't had time to test the new "optncx" branch. Will be bk.gettocid() return None for epub3 books without toc.ncx or will it raise a custom Sigil error?
I will take a look at that.

Thanks for the head's up.

Kevin
KevinH is offline   Reply With Quote
Old 07-11-2019, 11:49 AM   #30
KevinH
Wizard
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: 3,573
Karma: 2200024
Join Date: Nov 2009
Device: many
Okay checked the wrapper.py code and if no file in the manifest has the correct mimetype for the ncx ("application/x-dtbncx+xml"), it will return a python None, not a empty string. And this case of no ncx is already properly handled when rebuilding the spine attributes.

So to detect if an epub3 has an ncx or not, you can check the return value against None.

Code:
    def gettocid(self):
        for id in self.id_to_mime:
            mime = self.id_to_mime[id]
            if mime == "application/x-dtbncx+xml":
	        return id
        return None

Last edited by KevinH; 07-11-2019 at 11:52 AM.
KevinH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple epub:type roles for a file in landmarks nav jcsalomon Sigil 0 02-20-2018 02:08 PM
fixed layout landmarks issue leijoninna ePub 11 06-14-2013 04:24 AM
Free (Kindle/Nook) A Beginner's Guide to Using Your iPad as a Business Tool greencat Deals and Resources (No Self-Promotion or Affiliate Links) 4 10-04-2011 09:50 PM
Free (Kindle) A Beginner's Guide to Using Your iPhone as a Business Productivity Tool arcadata Deals and Resources (No Self-Promotion or Affiliate Links) 0 08-29-2011 03:34 AM
Using privately owned landmarks mr ploppy Writers' Corner 8 08-10-2011 01:51 PM


All times are GMT -4. The time now is 12:08 PM.


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