DaleDe
08-19-2009, 10:51 AM
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?
Dale
Dale
|
|
View Full Version : SIGIL format DaleDe 08-19-2009, 10:51 AM 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? Dale Valloric 08-19-2009, 11:23 AM 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. DaleDe 08-19-2009, 12:24 PM Thanks for the explanation. And the product. Dale mtravellerh 08-20-2009, 03:03 AM 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. I was just thinking if it might be possible to edit the sgf file directly with an editor to make up for that missing Search & Replace feature. What compression method did you use. I would like to uncompress it, edit the SGF file with my editor and save it back to sgf so that I could reopen it in Sigil. Edit: Okay, I found it out myself: The SGF file is a zip file, so editing it is simple. That solves a lot of my problems until S&R is done. astra 08-20-2009, 03:54 PM Thanks for the product. I haven't used it yet, but I am looking forward to it. zelda_pinwheel 08-23-2009, 08:59 AM I was just thinking if it might be possible to edit the sgf file directly with an editor to make up for that missing Search & Replace feature. What compression method did you use. I would like to uncompress it, edit the SGF file with my editor and save it back to sgf so that I could reopen it in Sigil. Edit: Okay, I found it out myself: The SGF file is a zip file, so editing it is simple. That solves a lot of my problems until S&R is done. actually, this is precisely how i've been working, but i just open the file in sigil, copy the entire code window to notepad (ctrl A ctrl C, then ctrl V in notepad) and do all my searches there. then i delete the code from sigil and paste in the updated version, and save. it's a bit less efficient than being able to search directly in sigil but it works quite well nonetheless. and it's nice having two windows so i can easily display (for instance) my css codes in sigil while i'm working in notepad, if i want to update some styles or refer to them. kjk 09-04-2009, 08:20 PM Great explanation-makes total sense now. Thanks! GeoffC 10-13-2009, 10:00 AM actually, this is precisely how i've been working, but i just open the file in sigil, copy the entire code window to notepad (ctrl A ctrl C, then ctrl V in notepad) and do all my searches there. then i delete the code from sigil and paste in the updated version, and save. it's a bit less efficient than being able to search directly in sigil but it works quite well nonetheless. and it's nice having two windows so i can easily display (for instance) my css codes in sigil while i'm working in notepad, if i want to update some styles or refer to them. Interesting, thanks for that idea Zelda. |