12-20-2018, 04:45 PM | #106 |
Yold
Posts: 14
Karma: 10
Join Date: Sep 2011
Device: none
|
DOCXimport troubles in Sigl
Hi DiapDealer,
I'm running Win10. When I look at my main Sigil menu, there's a menu item called "Plugins." When I open it, I am given a choice of "Manage Plugins" or three categories: Input, Validation, and Edit. Then I choose "Input" and the name Docximport pops up. I click on "Docximport" and immediately a window opens up with the title "Plugin Runner." At the top of the window there are two labels: the first says "Plugin: Docximport." the second is a green progress bar that says "Status failed." Within the window itself, this text appears: "Status:failed," and "Launcher: missing or incorrect paths passed in." At that point, all I can do is click on OK. Incidentally: (1) I appreciate your fast help and look forward to more of it. (2) I'm not looking for a turnkey conversion solution; just one I can edit easily. I've used Sigil with various HTML input files before, and I think I know what to expect. Finally, yes, I was expecting what you say: an input window in which to enter a filename.docx. The input window opens, but it immediately fills itself with the two error messages I described above, and doesn't give me any input choice except "OK." If you'd like, I can send you a screenshot of it. Again, thanks for being so helpful. -Jeff |
12-20-2018, 05:00 PM | #107 |
Yold
Posts: 14
Karma: 10
Join Date: Sep 2011
Device: none
|
Hi again, DiapDealer,
Here's a screenshot of what I get as soon as choose Docximport. |
Advert | |
|
12-20-2018, 05:01 PM | #108 |
Yold
Posts: 14
Karma: 10
Join Date: Sep 2011
Device: none
|
Well, I guess I don't know how to enter the URL of a local JPG image. Sorry, -Jeff
Last edited by JeffPalley; 12-20-2018 at 05:15 PM. |
12-20-2018, 05:36 PM | #109 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Now I'm really puzzled. It almost sounds as if your Sigil plugin launcher framework is incomplete. When you go to Plugins->Manage Plugins, Is the "Use Bundled Python" checkbox checked in the preferences? What version of Sigil? You're not using a Portable Apps version of Sigil are you?
As far as images go, you're trying to link to an image path that's on your own PC. To use IMG tags, you'd need to upload the image somewhere, and put the public url of that image in the IMG tags. You can attach an image to a post from your PC, by clicking the "Go Advanced" button below the post editor window, and then using "Manage Attachments" in the Additional Options section below the post editing window to add an attachment. Last edited by DiapDealer; 12-20-2018 at 05:41 PM. |
12-20-2018, 05:49 PM | #110 |
Yold
Posts: 14
Karma: 10
Join Date: Sep 2011
Device: none
|
OK DiapDealer, I think you solved it. "Use bundled Python" was NOT checked. I checked it and got a much friendlier window. Plus it imported and converted sample.docx with only a few warnings. Thank you very much, -Jeff
P.S. Thanks for the info about images. |
Advert | |
|
12-20-2018, 05:52 PM | #111 |
Yold
Posts: 14
Karma: 10
Join Date: Sep 2011
Device: none
|
Last time you'll hear from me today.
The warnings were from within your app. ... actually, from Mammoth. When I ran epubcheck and flightcrew on the epub file, they both returned "No problems found!" Last edited by JeffPalley; 12-20-2018 at 06:01 PM. |
12-20-2018, 07:15 PM | #112 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Glad to hear it worked! I haven't run the sample.docx through in while. I'll try to see what warnings Mammoth is generating from it. Perhaps I can make a few changes to the sample to make it import a little cleaner. Or perhaps leaving some warnings would be advantageous? Can't have people thinking everything will always work perfectly!
|
03-05-2019, 12:12 PM | #113 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
|
Hi. Trying plugin as suggested from Does import need some special treetment for empty paragraphs?
input: docx containing just one empty paragraph, using paragraph style "Text" style map: Code:
p[style-name='Text'] => p.Text:fresh Code:
<p">NBSP<p></p> </p"> Last edited by quinta@ebf.cz; 03-05-2019 at 12:43 PM. Reason: more descriptive replacer for numeric entity in code |
03-05-2019, 09:34 PM | #114 | |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 03-05-2019 at 09:37 PM. |
|
03-06-2019, 08:07 AM | #115 |
Guru
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
|
|
03-06-2019, 10:44 AM | #116 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Thanks! Would you mind terribly submitting a pull-request for this change on DOCXImport's github repo? That way I don't have to go to the trouble of manually crediting you with the fix.
I understand if forking/committing/pushing/submitting a pull request is bit too much for such a tiny change. Just let me know if so and I'll commit the change myself. Thanks again. |
03-06-2019, 03:15 PM | #117 | |
Connoisseur
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
|
Quote:
After applying BeckyEbook's patch things looks better. Some question: Is there possibility to simply import _every_ style used in source document? Without need of explicitly creating list of styles (for style map). E.g. by using wildcards in style map... or somehow. Code:
p.* => p.* r.* => span.* Last edited by quinta@ebf.cz; 03-06-2019 at 03:24 PM. Reason: added "(with imported style)" |
|
03-06-2019, 03:57 PM | #118 | ||
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
I'll be honest... I never envisioned this plugin being used for one user to convert other users' docx documents. It was primarily aimed at authors/creators who already had a standard Word style setup they used to create their documents in Word and could create a mammoth style map to accommodate that framework. Once it was initially set up, it would all just work (with occasional tweaks needed here and there). But this plugin isn't for anyone who's looking for that initial map creation phase to be done for them. A conversion process that can "smartly" convert unknown word style names (unknown to the user) into semantically correct, class-matched html that can be easily styled via css may be possible, but it's not likely going to happen with Mammoth. Last edited by DiapDealer; 03-06-2019 at 04:02 PM. |
||
03-06-2019, 04:57 PM | #119 |
Connoisseur
Posts: 59
Karma: 10
Join Date: Mar 2019
Device: Kindle 3 Paperwhite
|
Roger.
Detecting "unrecognized" styles is probably not done at the plugin level. So plugin cannot dynamically add items into style map? Mayby there is a possibility to use VBA macro to create complete style map for selected document. Sorry, just thinking loud. An interesting project. Thank you for assistance. |
03-06-2019, 05:24 PM | #120 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
No. The plugin can not dynamically add items into the style map. The plugin is actually very, very dumb. The underlying Mammoth python library is what does all of the heavy lifting. The plugin merely makes the user-defined style map available to the mammoth engine and makes sure everything that comes back out can be cobbled together as a valid Sigil EPUB. The plugin wouldn't have the first notion of what kind of styles the DOCX has in it. Mammoth hasn't processed it yet. A dynamically created style map based on the DOCX's defined styles would be putting the cart before a horse that hasn't been born yet.
And I'm not Roger, by the way. I'm Doug. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 02:25 AM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 11:11 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 03:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 01:11 PM |