03-28-2017, 10:23 PM | #31 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
Out of curiosity, I tried your nice plugin with a complex .docx file. It produces quite a clean output. I added a custom epub.css file without any problem. I have some questions. 1. - About structure I missed probably something, but I got only one .xhtml file for a 1.6MB ebook. Is there a recommended way to control spllitting into small .xhtml files? 2. - About metadata A lot were missing. Same question: is there a recommended place in the docx (or outside) to set metadata? 3. - About images All images were cleanly processed. But if I wish to set all (or most) of them in their own .xhtml page with margin 0, is there a way? Sorry for many questions and thanks for a nice plugin. Last edited by roger64; 03-28-2017 at 10:29 PM. |
03-29-2017, 12:41 AM | #32 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I only bother with Title and Authors - Mammoth seems to pick those up, and puts them into the places you'd expect. I suspect Tags would end up as DC Subjects, Comments as DC Description and Company as DC Publisher. No idea about the rest. BR |
|
Advert | |
|
03-29-2017, 12:56 AM | #33 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
|
|
03-29-2017, 03:25 AM | #34 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
03-29-2017, 08:42 AM | #35 | ||||
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
What you can do however is "mark" your split points in your source docx document with something like a horizontal line (or any empty named style paragraph, actually). That way, you can map (by creating a Mammoth style map) the horizontal line (or whatever you used) to Sigil's special split marker. My sample document and style map include this very technique ("p.HorizontalLine => hr.sigil_split_marker" ... meaning a Word paragraph of the style HorizontalLine will be converted to an hr tag with the class name "sigil_split_marker"). That way, the user can split the epub into "chapters" immediately after the plugin is done. I suppose I could have the plugin perform the file-splitting at those markers as its final step. But quite frankly ... I have no desire to port Sigil's complex, pre-existing C++ chapter-splitting routines to Python when a quick menu-item or keyboard shortcut can split the file after the new epub as been created. Quote:
Quote:
Hope that answers your questions. I'm certainly no Mammoth expert, so I encourage users to read their documentation on creating style maps (there's a link in the first post). I just wrapped their work into a Sigil plugin. Last edited by DiapDealer; 03-29-2017 at 08:44 AM. |
||||
Advert | |
|
03-29-2017, 09:22 AM | #36 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
@DiapDealer
Thanks for taking the time to write such a detailed reply. I will begin to tune the "style-map" without forgetting to map this important horizontalline item. Out of using a manual page break like you advise, there also could probably be a way to provoke an automatic split before h1 (or some other) titles. If I compare with ODTImport, I use manual pagebreaks to create individual pages for images and, after that, once the EPUB has been created, I use a plain regex to give their body a null margin. Time to experiment. |
03-29-2017, 02:27 PM | #37 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not within the plugin, though. As I said, Sigil's C++ file-splitting routines are not available to plugins, and I'm not going to reinvent the wheel, so to speak, with Python. Not when automatically marking the split points with the plugin, and then splitting with Sigil immediately after the plugin is done is so trivial to do.
|
03-29-2017, 04:07 PM | #38 |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Slightly OT - does Sigil have a simple tool to spilt monolithic files based on header tags h1, h2 etc. I thought it did but now I can't find the blessed thing. I thought it was in the book browser context menu, but I might be misremembering.
Polluting the DOCX originals with artefacts just for Sigil to use isn't an option for me. BR |
03-29-2017, 04:51 PM | #39 | |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
You can always use regex to insert the split marker in front of particularly classed h tags (after the document is in Sigil of course). Last edited by DiapDealer; 03-29-2017 at 04:55 PM. |
|
03-29-2017, 05:36 PM | #40 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
03-29-2017, 06:17 PM | #41 | |
Well trained by Cats
Posts: 29,781
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
then hit F6 to DO the split at Markers Thingy |
|
03-30-2017, 04:30 AM | #42 | |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
But in my dreams I right 'right click' on the monolithic xhtml file, select something like 'Split at Headers', it prompts me for a file name prefix which it defaults to "Chapter", I click OK, and I'm off to races BR |
|
03-30-2017, 05:51 AM | #43 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Code:
<!-- File options --> <option name="external_toc_depth" value="3" /> <option name="split_level" value="2" /> <option name="repeat_levels" value="5" /> <option name="page_break_split" value="explicit" /> <option name="split_after" value="0" /> <option name="image_split" value="none" /> <option name="cover_image" value="false" /> <option name="save_images_in_subdir" value="false" /> <option name="uplink" value="" /> http://writer2latex.sourceforge.net/...ual-screen.pdf page 58 Last edited by roger64; 03-30-2017 at 06:51 AM. Reason: doc |
|
03-30-2017, 08:38 AM | #44 |
null operator (he/him)
Posts: 20,553
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Introducing another format (ODT), more software (Open Office of some sort), latex2html, and another Sigil plugin sounds like a nightmare to me
I'm a minimalist - less is better, least is best. So I don't use toolbars, I avoid using the mouse, I don't have covers on my EPUBs, and I reduce EPUB embedded metadata to title, author, publisher, and date of publication, anything else is dross and it gets removed pronto I think I can do a calibre EPUB to EPUB conversion and use it's XPath gadgetry to do the splits and retain the results of my style mapping. I just need to find the time and inclination to confirm the latter in detail. I have and use calibre daily. BR |
03-30-2017, 08:52 AM | #45 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Though the settings may be a little long to set up, once it's done, everything is automatic...
I did not change anything in config.xml for several months. It's the usual trade off, long before, easy after OR easy before, long after... Anyway, everyone makes his choice. /off and sorry. Last edited by roger64; 03-30-2017 at 08:58 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |