![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
![]()
The subject says most of it - and I have a tendency to type a ton without realizing how long a post has gotten - so...count on this being a long post, but it does contain a number of questions I've often wondered about in Sigil. I also want to add that I know my questions/concerns aren't shared by everyone and that I may do things a ton differently than most people, but I try to keep it simple.
My process is to edit an html file to be squeaky clean with a very minimal CSS. One file for the entire book - including cover, title page, dedication, acknowledgement, epigraphs/preface/prologue, chapters, epilogue, and a TOC at the end of the file that is referenced via link at the beginning of every chapter heading. My HTML "all in one file" is used for converting to several different formats, but I've added in the Sigil specific chapter break tags and the "sigilNotInTOC" bits for ease of ePub creation with Sigil. So far, no problems with the book-builds...but a few questions: Previously (to 0.4.0's official release) I would start my Sigil session by dragging my html file onto the Sigil desktop icon to get Sigil to auto-import that file to begin with (so as to not have a Section0001.xhtml file to have to remove and such). I would then rename my all in one html file to "Section0001.xhtml" and rename my cover image to "cover.jpg" just to make all my files consistent and shortened filenames that were easily identified (and to avoid my original filenames - which have numerous spaces). Then I would hit F6 to split my HTML file on Sigil chapter markers. (reordering the file list so it was all in order, then generate TOC, save epub, and validate) Now - and I do understand and have had it explained that Section####.xhtml naming on splits wasn't really clear for IDing what file was what or for Sigil's sequencing cues. My questions now though... 1. Why does each file-split numbering convention start with "0002" still - if that is the case, can/should the original of the split file be renamed during split to have "0001" added for similar naming? 2. Is there any way for Sigil to incorporate - along with the Sigil chapter markers - defined filenames upon split? If none are specified the filenames could do as they do now and append a number after the starting filename. The main reason I ask is this - I'm now at a loss for what to name my starting file to get all my files to "line up" with same-length and same-format names. The new naming is supposed to make it easier to perhaps see what a file is based on a name - but for me, the starter file containing the first section - my cover image imbedded with my title page - is whatever my starting filename choice is. Then my dedication/acknowledgements/epigraph/and so on start numbering with filename+_0002. So "Chapter 1" usually ends up someplace around filename_0004 or so - making the filenames for the splits just as "useless" as naming them by section numbers. All I've really gained by changing the method for split-naming myself (aside from the files being in order due to better sequence queues?) is the necessity to re-normalize all my already made ePubs if I want their internal bits to be consistently named going forward and using Section.xhtml for the first file then renaming it to Section_0001.xhtml post-split to make it more "inline" ordered. (Even if I made the first split never happen before the chapter 1 began, my chapter numbers would never start at "1" from the original file...they would begin at "2".) I guess maybe a auto-split like now, but with finer control - so I can name file 1 "cover", do the first split and rename the "cover_0002.xhtml" file to 'dedication.xhtml', do another single-split and rename "dedication_0002.xhtml" to 'ack.xhtml', then when I split it off and can rename the resulting file 'chapter.xhtml' (to be renamed after splitting all the other chapters off it to "chapter_0001.xhtml") and renaming the final few split files to epilogue and toc as needed - but that's really not any different than doing an auto-split and renaming every file created to make it usefully named. When I tried doing a manual split, I ended up with chapter 1 being in the proper place on the file-tree - in order between my dedication file and my chapter 2 file for that book - but the TOC generation window insisted that Chapter 1 was the last file in the list no matter how I attempted to re-order files to reset it to knowing that chapter 1 was really in the right place. I'm used to having to re-order my splits around to get them in the right order for the TOC with an older release candidate for 0.4.0 from March, but apparently dragging the files into order doesn't quite work that way for the toc generation anymore? I really want to understand all this - and I really would like a way to make my files have nice pretty well-formed and informative names, without having a multitude of "starter" files for each section to import instead of splitting off a master single file like I have now - but barring that, having a way to easily and consistently name the files along the same scheme without renaming the starting file to include the "_0001" bit that gets added to all the split files would even be a help for my OCD. I'm just hoping to offer ideas to help match up the changes so the file list is both useful/meaningful and provides Sigil with the sequence cues needed for ordering the final file list. I use a template file to put all my new texts into - so putting in specific naming schemes for section splits would be a simple matter for me anyway - particularly if the "sigilChapterBreak" were able to accept title or id attributes afforded to whatever the class was "attached" to somehow but I'm REALLY not clear on how that all would work since it is a "class"... Anyway - I know this has gotten long, and I know this can just all get filed as "user wants too much customization" or something...I'd just keep using the old release candidate version, but doing that means I have to re-order my files after splitting (which I do understand was part of the new naming structure for splits reasoning). I'm not a programmer so I have no idea how impossible the things I'm curious about really would be to implement. I do appreciate the work of everyone who contributes to the Sigil project though - I do want that clear at the very least - it has been a HUGE time saver for me. |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Well, the reason for the naming change was that the old method only worked if you had everything in one html file and then split that. If you were compiling a book from several files with chapter markers and then split them it could result in a great jumble in which it wasn't clear how the split files related to the original ones.
It might be possible to allow the split name to be specified in the hr tag, something like <hr id="New_Filename" class="sigilChapterBreak" /> which would then specify the name for the file created after the tag. The filename would be limited to valid properties for the xhtml id attribute: Quote:
As for the problem you had with the ToC - did you have spaces in the file name? I hope all the issues with spaces should be fixed in the next release. Last edited by charleski; 08-19-2011 at 06:50 AM. |
|
![]() |
![]() |
![]() |
#3 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
The names of the files do not matter. If you don't like the name right click and select rename.
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Not a Sigil Developer : My observations: Split numbering (3.x) starts with the first unused number.
My work flow: do a Split (split off now Section0001) rename the split to something more meaningful (c01, or for multi part books with more than 1 Chapter 1: 1c01) do another Split (split off Note:it is again Section0001 since there is no longer a 0001 used ) |
![]() |
![]() |
![]() |
#5 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
Quote:
And yes, for me personally - being able to specify the new filename post-split in the hr tag would be excellent - if it can be done it would be a gigantic help for me personally (and I understand that being a big help for me doesn't particularly make it a worthwhile addition for Sigil's programming and worthwhile expenditure of programmer time - though I'd love it, I get that I'm not the only person using Sigil ![]() |
|
![]() |
![]() |
![]() |
#6 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
Quote:
For now though, yeah, I figure I'll do my files simple and similar to how I did them before as "Section" as my starting file name and let the split append numbering to it as before. I'm just trying to find a way to hopefully share ways to make the process as useful/simple/and helpful as possible for people like me I suppose. I don't want to come across sounding like a petulant child who wants things her way just for the heck of it. I want very much to offer ideas that might help make the results from splits be more usefully named for those who do the kind of thing I do and like to have very consistent file names within all their created final ePub files. (At this point for example, I could let it go and accept that my older files will differ from my newer ones, redo all my old files to a new name-scheme based on a still possibly fluid name-scheme for splits, or try to come up with a possible way to make it so the internal file names will be consistent ten versions from now or fifty versions even if the way auto-split filenaming changes again - preferably without renaming every last split file every time I create another epub...). My preference would be to help shape the process while bugs are still being worked out of file naming and proper ordering post-split instead of coming across it months from now and trying to get changes made to a system that may not need much work after all the little quirks have been worked out here and now...and I do know the current bugs are likely very minor, but at least presently that part of the code is still being mucked about with here and there for even minor fixes. That may be less true over time - as I stated previously - I'm not a programmer (though I do know a large number of programmers and have a bit of a clue about some codebases) - and that code may be frequently "touched" throughout developing other portions of Sigil over time. |
|
![]() |
![]() |
![]() |
#7 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
Another "oddity" I see with 0.4.0 - and I'm not entirely sure how to explain it to make sense...
my simple "template.html" and the associated style.css and template.jpg files work as expected - and as I believe all the files did in the older version I was using. My "all in one" files that contain full book text (and which contain spaces in the names) - behave differently. First I will explain the expected, then the oddness I'm seeing... Drag "template.html" to the Sigil icon - thus opening Sigil with the template html file, the template jpg image and the style css files that were linked - all three files appear in the file tree/browser. Open the "content.opf" file. Within the manifest section - the following is present: Code:
<manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml" /> <item href="Styles/style.css" id="style.css" media-type="text/css" /> <item href="Images/template.jpg" id="template.jpg" media-type="image/jpeg" /> <item href="Text/template.html" id="template.html" media-type="application/xhtml+xml" /> </manifest> Code:
<item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg"/> <item href="Text/book.xhtml" id="book.xhtml" media-type="application/xhtml+xml"/> Now, I try the same process but instead of the file named "template.html" and "template.jpg" those files are instead named something with spaces prior to them being placed into Sigil for conversion/epub creation from html file (as this is my general process, my original files almost always contain spaces and until now I've not seen this behaviour)...I used: import template test file.html and the same name for the jpg (style.css remained the same) and the manifest in content.opf starts off like: Code:
<manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml" /> <item href="Styles/style.css" id="style.css" media-type="text/css" /> <item href="Images/import%20template%20test%20file.jpg" id="importtemplatetestfile.jpg" media-type="image/jpeg" /> <item href="Text/import%20template%20test%20file.html" id="importtemplatetestfile.html" media-type="application/xhtml+xml" /> </manifest> Code:
<manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/> <item href="Styles/style.css" id="style.css" media-type="text/css"/> <item href="Images/cover.jpg" id="importtemplatetestfile.jpg" media-type="image/jpeg"/> <item href="Text/book.xhtml" id="importtemplatetestfile.html" media-type="application/xhtml+xml"/> </manifest> The March 24th release (importing the template filename with spaces) initially (prior to rename) shows: Code:
<manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml" /> <item href="Styles/style.css" id="style.css" media-type="text/css" /> <item href="Images/import template test file.jpg" id="importtemplatetestfile.jpg" media-type="image/jpeg" /> <item href="Text/import template test file.html" id="importtemplatetestfile.html" media-type="application/xhtml+xml" /> </manifest> Code:
<manifest> <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/> <item href="Styles/style.css" id="style.css" media-type="text/css"/> <item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg"/> <item href="Text/book.xhtml" id="book.xhtml" media-type="application/xhtml+xml"/> </manifest> If you want, I'll transfer this post over to the issues portion of the Sigil project page - but I figured I'd mention it here where I'm a little more comfortable with the tools available for creating/editing posts. |
![]() |
![]() |
![]() |
#8 | |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
I appreciate this. While I might not see something as being worth implementing that doesn't mean others feel the same way. Also, just because I don't think it would be worth spending time on a feature doesn't mean I can't be convinced otherwise. |
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I am curious: Why does it matter what the internal filename is called, as long as it is correct.?
I understand the use of Meaningful naming: cvr.jpg is just as meaningful as 9781234567890_cover_image.jpg having names for sections allows easy manipulation of order: p01.html c09.html ded.html inline.html work for me just as well as a long name Just how many times do the individual files exist separately (un-ziped) that they need their filenames encoded with the full Title and/or ISBN? |
![]() |
![]() |
![]() |
#10 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
Quote:
My file names don't need to be long by any stretch of the imagination - but - I keep my source HTML files for use outside of ePub creation. So, I have a file/folder structure that is pretty simple for me to navigate and has all the info without opening files to read metadata to make sure "this file is part of this book/series/author/isbn. All my final file names (the epub, lit, mobi/prc, pdf, word, rtf, html and cover) - whatever I convert the file to and the source file - are the same with the only difference being the extension. My folder structure is: %bookstoragelocation%\authorlast, first\all their books My file name structure is set to give me the author name again because I don't always folderize on devices: authorlast, first - seriesname ## - book title followed by each extension. (also makes it easy to zip up the collection of file formats for a single book for archival - without using more folder sublevels as well) I use a basic template for my html file which lets me quickly use replacement "masks" for each segment of naming (as well as easy replacements for my title page and metadata using the same "masks"). So internal to the html file, my naming is simple and provides quick and easy replacement for things that aren't solely filename references. Within Sigil - I do try to keep my file names short - that's why I purposely rename the files instead of leaving the initial file and letting it split with that big long filename (the spaces being the other reason right now - but even if I used underscores in place of spaces, I'd still rename the first file to make it shorter and clearer). Having the old filename appear as the id - to me - is less desired due to the additional "clutter" and inaccuracy that the mis-match causes. 'bookcontent_0005' isn't as clear as 'ch_003' would be for example. I do love that Sigil will replace all instances of the old name of a file with whatever I rename it to throughout the book's html code making renaming easier. I would just love to be able to put into my template that the section that splits off the dedication into its own file should be named "dedi.xhtml" instead of filename_0002.xhtml, or "ch_0001.xhtml" instead of filename_0004.xhtml. I could do the splits manually and rename files split off one by one until I get to the beginning of the chapters - then rename the renaming chapter source to 'ch.xhtml' thus having all the remaining splits give me chapter identifying filenames (just needing to change the ch starter file to include _0001 and the final split or two to reflect the inline toc or epilogue). To me though - I put split markers in there to automate as much as possible and there isn't a way that I can tell to have Sigil find and split only the first marker short of finding it in the file and doing a manual split. I guess what I'm getting at is that the new file name on split being based on the starter file name is no more "meaningful" (in my case) than naming each file in the series a basic number with no description at all as it was before with just "section" and a number. Now - IF I used multiple html source files - I could certainly see how it would be more useful, I could have each of the unique files separate and just one file for the book chapter content that I could then split. I just try to keep my own filesystem outside of epubs as simple and clean as possible too. I'd rather not have each book have its own folder with a series of html files for example - since I can get Sigil to split the single file where I want it split, why should I store more than one html file for the book otherwise? Sorry I get long-winded - but I hope I explained a bit better here if that was directed by way? |
|
![]() |
![]() |
![]() |
#11 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
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:
I have no issue having a Long name for the Book CONTAINER (EPUB,ZIP). My question on 'Production Rules' of really long names for contind files. You and I seem to use a terse naming, wich is good enough to find (the typo in ch6 ![]() |
|
![]() |
![]() |
![]() |
#12 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18
Karma: 716
Join Date: Jun 2009
Location: San Francisco, CA, USA
Device: Astak EZReader, Sony PRS-350
|
Quote:
![]() And yeah - I tend to (now that I have a reader that makes it easy to keep track while reading) mark errors in my books as I read them, compare vs print edition or a master digital copy (generally pre-html-ifying a document for example) to figure out where the error came from, then fix as needed in the html file - presently I just remake the ePub from the HTML source again - even for one little error in say...'ch006' because it is easier FOR ME than hunting down which one of the file splits (though I know it'll be after the file with 0006 at the end by 1-6 files) contains chapter 6 content and then from there to locate the line with the issue and repair it. Since I had to fix the typo/punctuation/error-of-random-type in the HTML, reconversion/epub creation just seems to be the fastest fix - but if I'm trying to rename all the split files (sometimes nearing or exceeding - though rarely - the 100 html file mark for content) again, that suddenly becomes less 'simple' if it is one error, but I've gone through larger book files and fixed dozens or even hundreds of errors (one book source I'd received for example had pulled out all the apostrophes when attached to a proper name, so I had to hunt down all the instances and fix em - re-conversion/creation there was really the best solution post-fixing all of em. But, would mean renaming to as you called it 'terse-naming' for all the splits again - some more automated way to do the naming on splits - huge help here ![]() But yeah, it isn't a critical issue for me to have useful naming internal to the epub structure, I can go with the simplest form and just remake the epub any time I change anything in the html - at least now that I've figured out a few things with metadata, I can use the super simple process of: drag html file to sigil's icon to import the files rename the cover and book html to shortest name I can hit F6 - quick eyeball over the names in case any got jumbled (this can fade away once all the bugs get worked out with file order and splits) generate TOC to update/fix for splits (it looks like Sigil creates a TOC upon initial import but now update when you do the splits maybe? I just know if I don't hit the generate toc button, validation is...ugly) save epub and validate Oh, and until/unless it gets fixed, update id bits of the renamed files in content.opf pre-split to reflect new names, because my OCD works that way... ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"add metadata as 1st page" won't work on batch [send to device] | Bellychaser | Devices | 3 | 01-25-2011 03:25 PM |
Google Books client - How does "reading positions sync" work? | hakan42 | Android Devices | 0 | 12-15-2010 01:12 PM |
Is there a "fix" or work-around for Kindle doubleing size of small graphics? | bfollowell | Amazon Kindle | 15 | 11-14-2010 07:27 PM |
"Menu" and "Mark" keys does not work | murad | Sony Reader | 4 | 07-11-2009 12:35 PM |