Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 07-10-2020, 02:10 PM   #136
xiaoyu_sigil1010
Junior Member
xiaoyu_sigil1010 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2020
Device: kindle
How do I import multiple docx files?
xiaoyu_sigil1010 is offline   Reply With Quote
Old 07-10-2020, 02:30 PM   #137
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by xiaoyu_sigil1010 View Post
How do I import multiple docx files?
You don't. This plugin takes one docx file and makes an epub out of it.
DiapDealer is offline   Reply With Quote
Advert
Old 10-26-2020, 03:53 AM   #138
dcsj
Junior Member
dcsj began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: Kindle Paperwhite
Hi, I asked you a question a few months back and am back with another one. I've been working on a massive file, getting it ready for import into Sigil. It's about 200 pages in Word.

So I ran your plugin and everything did what it was supposed to do, but I ran into one that puzzles me. With such a big file, Sigil slows to a crawl. I think that if I broke the file up into sections, it would behave better. Do you have any suggestions on that? That is, are there other plugins that might be able to combine Sigil files somehow? Or any special tags I could put in to break the file up automatically? (I don't think you want to do that one, but thought I'd ask anyway.)

Anyway, thanks for your earlier help, got me on the right track with this. Learning as I go.
dcsj is offline   Reply With Quote
Old 10-26-2020, 09:35 AM   #139
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil has its own built-in file-splitting feature. Your best bet would probably be to use Find and Replace to insert the sigil split markers where your new chapters begin, and then use Split at Markers.

If you're using a custom style map with docximport, you can also map a particular docx element to the sigil split marker directly. I believe I have an example of this in the samples attached to the first post of this thread. Then you would just need to run Split at Markers after import.

Last edited by DiapDealer; 10-26-2020 at 09:39 AM.
DiapDealer is offline   Reply With Quote
Old 10-26-2020, 10:01 AM   #140
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Could these files be one large file with only a few linebreaks? If so, running Mend on it might help speed Sigil up.
KevinH is offline   Reply With Quote
Advert
Old 10-26-2020, 04:16 PM   #141
dcsj
Junior Member
dcsj began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: Kindle Paperwhite
Thanks, I'll try those tips and let you know how it works out.
dcsj is offline   Reply With Quote
Old 10-26-2020, 04:29 PM   #142
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I use a horizontal line in the Word doc where chapter breaks should occur.

Then in the style map I use the following:
Code:
p.HorizontalLine => hr.sigil_split_marker
to map it to an hr tag with the css class "sigil_split_marker". That's what Sigil uses to mark places where the Split at Markers feature should do its work.
DiapDealer is offline   Reply With Quote
Old 10-28-2020, 05:48 PM   #143
dcsj
Junior Member
dcsj began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2020
Device: Kindle Paperwhite
Quote:
Originally Posted by DiapDealer View Post
I use a horizontal line in the Word doc where chapter breaks should occur.

Then in the style map I use the following:
Code:
p.HorizontalLine => hr.sigil_split_marker
to map it to an hr tag with the css class "sigil_split_marker". That's what Sigil uses to mark places where the Split at Markers feature should do its work.
I noticed that in your sample file. I tried it, but I think I must not have been inserting the horizontal line in a way that the converter recognized. However, I was able to insert a piece of text that I could search and replace with the hr split marker tag, so I got it to work that way.

My next question is this. I had several custom styles built, but the converter wouldn't recognize them. Here is one error result:
Message(type='warning', message='Did not understand this style mapping, so ignored it: p.Blockquote2=> blockquote2:fresh')
Blockquote2 is a style I created in Word, then also defined a style in the stylesheet called blockquote2.

I can't remember what the genius reason was for this variation on the normal Blockquote, but there must have been one! Anyway, I mention it just to get a better handle on what I am doing right and wrong with the importer. Thanks for your help!
dcsj is offline   Reply With Quote
Old 10-28-2020, 07:23 PM   #144
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think your custom styles are probably fine. But in your example, you don't seem to be mapping it to an html element; just a css class. Unless what you posted was a typo, your map should probably be something like:
Code:
p.Blockquote2 => p.blockquote2:fresh'
If that doesn't work, I occasionally have to use the alternative docx style-naming syntax (also shown in the samples)
Code:
p[style-name='Blockquote2']  => p.blockquote2:fresh
Or you could map it to a div (=> div.blockquote2:fresh) depending on your preference for coding/styling blockquotes in xhtml.

Just remember that both sides of each mapping needs an element. The right-hand side needs to be mapped to an html element. A css style class alone is not enough.
DiapDealer is offline   Reply With Quote
Old 03-05-2021, 02:27 PM   #145
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
Any interest in a patch or pr to check for and use libreoffice in headless mode via a subprocess to convert .wmf and .emf images to .png images on the fly?

It will work on Linux, MacOS and should work on Windows if LibreOffice is installed on the system running the plugin.

See this post for reasoning and details.

https://www.mobileread.com/forums/sh...&postcount=219

If interested, let me know and I am willing to take shot at it. Changes should be restricted to your ImageWriter routine (hopefully) plus a routine to make a subprocess call.

Thanks

Last edited by KevinH; 03-05-2021 at 02:29 PM.
KevinH is offline   Reply With Quote
Old 05-22-2022, 08:46 AM   #146
Gunivortus
Enthusiast
Gunivortus began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Apr 2019
Device: Onyx Boox Note 3
No input file selected!

It fails to import a DOCX file I created with LibreOffice.
Here is a description ...

I use Sigil Version 1.9.2 under Windows 11.

Sigil is started.
A click on Plugins -> Manage Plugins. The Preferences window is opened, on top I see:
Path to Interpreter Executable - behind that the option 'Use Bundled Python' is checked. (blue with a white check v in it).
Below that I see:
Python3.4 and on the right of that two grayed-out buttons 'Auto' and 'Set'.
Further below, in the list of plugins I see three plugins. One of them is:
DOCXImport 0.2.8. .... and Author, Type and Interpreter.

Then I click again on Plugins and choose Imput -> DOCXImport.
A 'Plugin Runner' window is opened, under the word 'Plugin:' there's something green moving and it says: Status: running.
Below that, this information is shown:

Current Python sys.path: ['C:\\Program Files\\Sigil\\plugin_launchers\\python', 'C:\\Program Files\\Sigil\\DLLs', 'C:\\Program Files\\Sigil\\lib', 'C:\\Program Files\\Sigil', 'C:\\Program Files\\Sigil\\lib\\site-packages', 'C:\\Users\\Guniv\\AppData\\Local\\sigil-ebook\\sigil\\plugins\\DOCXImport'].

Application dir: C:/Program Files/Sigil
Python is Bundled: True
Qt translation dir: C:/Program Files/Sigil\translations
Looking for qtbase_en in C:/Program Files/Sigil\translations
Translator succesfully installed: False
docximport_en C:\Users\Guniv\AppData\Local\sigil-ebook\sigil\plugins\DOCXImport\translations
False

Also another smaller window 'DOCXImport' is opened.
On top the options 'EPUB2' and 'check for plugin updates' are checked.
The options 'Use Custom Style Map' and the Debug Mode are both checked.
I click the button right below 'DOCXFile to import. In the new opened window I choose the docx file I saved from LibreOffice.
It appears in gray below the 'DOCX file to import.
I click OK
The small windows disappears and at the end in the 'Plugin Runner' window it is stated now:
No input file selected!

What's wrong?

Kind regards,
Gunivortus

Last edited by Gunivortus; 05-22-2022 at 08:52 AM.
Gunivortus is offline   Reply With Quote
Old 05-22-2022, 08:57 AM   #147
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 783
Karma: 2298438
Join Date: Jan 2017
Location: Poland
Device: Various
The problem occurs when you check the checkboxes for "Custom Style Map" and "Custom CSS" but do not select the appropriate files.
So first and foremost, UNCHECK all checkboxes.
Attached Thumbnails
Click image for larger version

Name:	docximport-issue.png
Views:	157
Size:	15.4 KB
ID:	193919  
BeckyEbook is offline   Reply With Quote
Old 05-22-2022, 09:13 AM   #148
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Any interest in a patch or pr to check for and use libreoffice in headless mode via a subprocess to convert .wmf and .emf images to .png images on the fly?

It will work on Linux, MacOS and should work on Windows if LibreOffice is installed on the system running the plugin.

See this post for reasoning and details.

https://www.mobileread.com/forums/sh...&postcount=219

If interested, let me know and I am willing to take shot at it. Changes should be restricted to your ImageWriter routine (hopefully) plus a routine to make a subprocess call.

Thanks
I'm absolutely baffled how I missed seeing your post for over a year! I did experiment with using ImageMagic to convert (w|e)mf images at one point, but I can't remember why I didn't ever implement it. Times (and priorities) change, but if you ever circle back to this idea, i's be happy to include anything you come up with.
DiapDealer is offline   Reply With Quote
Old 05-22-2022, 09:16 AM   #149
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,044
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by BeckyEbook View Post
The problem occurs when you check the checkboxes for "Custom Style Map" and "Custom CSS" but do not select the appropriate files.
So first and foremost, UNCHECK all checkboxes.
Are those checkboxes checked by default in a new installation, or did they get checked in some other way? Just wondering if I need to do something here.

Last edited by DiapDealer; 05-22-2022 at 09:26 AM.
DiapDealer is offline   Reply With Quote
Old 05-22-2022, 09:22 AM   #150
Gunivortus
Enthusiast
Gunivortus began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Apr 2019
Device: Onyx Boox Note 3
Thumbs up

Quote:
Originally Posted by BeckyEbook View Post
The problem occurs when you check the checkboxes for "Custom Style Map" and "Custom CSS" but do not select the appropriate files.
So first and foremost, UNCHECK all checkboxes.
BINGO!
Thank you!

Kind regards,
Gunivortus
Gunivortus is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 05:27 PM.


MobileRead.com is a privately owned, operated and funded community.