Thread: SIGIL format
View Single Post
Old 08-19-2009, 12:23 PM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by DaleDe View Post
What is the difference between the .sgf format and ePUB file format? They look very similar to me. Is there an advantage to using .sgf?
SGF just takes whatever the state of your XHTML code is in currently and dumps it as one large XHTML file (in an epub-like container, with the included images etc). The source file looks exactly like what you see in Code View.

Exporting an epub takes your source code, splits it up on chapter breaks, filters out Sigil-specific CSS and XHTML, creates CSS files from <style> tags and then writes it all out. It's a bit more involved than that. So there is some (a lot actually) pre-processing going on.

With SGF, there is no preprocessing. It's your "working" code dumped raw. The benefit here is that you are isolated from the changes that are made when exporting an epub. With time, I'll add dialogs that pop up on import and export (like what Photoshop does for instance) that let you fine-tune how your file is imported or exported. You could perhaps add margins on export, or on import filter out the cruft from HTML exported from Word etc. None of this will happen for SGF, because that format is already "the way it should be". Think of it as Photoshop's PSD.

In the future, when Sigil supports loading and saving of different file formats (RTF, Mobi, LIT, LRF etc... who knows), those formats will conceivably need some specific information recorded that you can't just store in an epub. So when working on it, you would store it as an SGF, and it would have all the possible information you could record in Sigil.

Again, the idea is to have something like Photoshop's PSD. A "neutral", application-specific format that could be extended, changed, updated etc.
Valloric is offline   Reply With Quote