08-09-2020, 04:47 PM | #31 | ||
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
This was disappointing because I rather liked the gui interface with all the options that writer2xhtml presented. The one case which did work ok was from the Publish button on writer2xhtml's small toolbar. Because it didn't allow me to select a file name, care was needed to avoid overwriting a previous version. Quote:
Over the weekend, I loaded an odt file into Calibre and then converted it to epub. The result wasn't too bad but the epub did need some cleaning up. Perhaps the worst was Calibre's production of unwanted and useless <span>'s. One short paragraph was more than doubled in size by what seemed to me to be useless <span>'s calling up CSS "classes" to apply to a single letter. The original odt paragraph was a two liner in Text Body style with no manual formatting applied. Calibre did not hijack any image to produce a cover page but instead created the page with a text based svg image. At present, I'm unable to decide which workflow is going to require the least cleaning up. |
||
08-09-2020, 09:21 PM | #32 | |||
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
There is no "hijacking" in writer2xhtml but only user selected options. 1. - for the writer2xhtml GUI (for LO) you have to check or uncheck this one Quote:
Quote:
As you can see, the wording of the config.xml options can be slightly different from the one of the GUI, but if you go carefully and slowly through all the options of the config.xml , you'll find similar ones to the GUI. The purpose of each option is given in the writer2xhtml documentation online. Last edited by roger64; 08-09-2020 at 09:50 PM. Reason: similar |
|||
Advert | |
|
08-10-2020, 12:37 PM | #33 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
I see I've got some reading up to do to optimise my settings for the plugin. And I should think that once I've taken that step, it will probably be as easy as the LO Writer Extension. |
|
08-11-2020, 01:09 AM | #34 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Yes, it's worth it if you plan to use odtImport regularly. You need to do it only once. The same goes for the epub.css file (if you wish to append one). |
|
01-23-2021, 10:29 AM | #35 |
Wizard
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Windows 10 32 bit, Sigil v. 1.4.3.
I used the plugin for the first time, but got the following error message: Code:
Status: failed This is Writer2xhtml, Version 1.4 (2014-02-16) Starting conversion... Reading style sheet C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\epub.css Reading configuration file C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\config.xml Converting C:\Users\Juerg\OneDrive\OCR\Johann K. Musus, Die Entfhrung\Johann K. Musus, Die Entfhrung.odt Done! |
Advert | |
|
01-23-2021, 11:19 AM | #36 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
It should show ODTImport 0.3.2. If it doesn't, please uninstall the current version and install ODTImport 0.3.2. |
|
01-23-2021, 01:15 PM | #37 |
Wizard
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
You are right, thank you! But now it's this message:
Code:
Status: failed Python Version: 3.8.3 writer2latex.jar command line: java -jar C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\writer2latex.jar -epub -config=C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\config.xml -stylesheet=C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\epub.css E:/OCR/Johann Musus, Die Entfuhrung/Johann K. Musäus, Die Entführung.odt writer2latex.jar messages: This is Writer2xhtml, Version 1.6 (2018-03-06) Starting conversion... Reading style sheet C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\epub.css Reading configuration file C:\Users\Juerg\AppData\Local\sigil-ebook\sigil\plugins\ODTImport\config.xml Converting E:\OCR\Johann Musus, Die Entfuhrung\Johann K. Musus, Die Entfhrung.odt Done! |
01-23-2021, 02:33 PM | #38 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
If you've installed this plugin on an older Windows machine without Unicode support, try removing all umlauts and/or accented characters from the file name. If that doesn't fix your problem, test the plugin with this test file, which converted fine on my Windows 10 machine. |
|
01-24-2021, 07:27 AM | #39 |
Wizard
Posts: 1,035
Karma: 11227259
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
|
Renaming the file (and the directory, for safety reasons) and removing all Umlauts and periods did the trick!
The result looks really pretty. Thank you! |
04-09-2022, 01:18 PM | #40 |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
I've just had a failure of ODTimport plugin in Sigil. Although my Sigil 1.1.0 is rather old, it's what comes with UbuntuStudio 20.04 LTS (which I'm hoping to update to 22.04 in a few weeks' time) and I had it working well in 2020 and 2021. I had a few problems which were resolved in this thread towards the end of 2020. I note that 0.3.2 is still the current version of the ODTimport plugin.
My last useful production using ODTimport with my setup was in the summer of 2021. Although I did run into a snag which my investigations showed to be a problem caused by my replacing png images with gifs in the odt file before converting to epub. When I returned to the original pngs, all was well. I'm afraid the notes I kept of that incident were rather sketchy. Today my odt file has all png images so that wouldn't appear to be the problem. The error messages are: writer2latex.jar messages: This is Writer2xhtml, Version 1.6 (2018-03-06) Starting conversion... Reading style sheet /home/pnj/.local/share/sigil-ebook/sigil/plugins/ODTImport/epub.css Reading configuration file /home/pnj/.local/share/sigil-ebook/sigil/plugins/ODTImport/config.xml Converting /home/pnj/Documents/Cycle_des_quintes_Workbooks/Volume-1/e-book versions/CDQ-WkBk-V1a-eBkdev.odt Writer2xhtml failed! Java error messages: Exception in thread "main" org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist. at java.xml/com.sun.org.apache.xerces.internal.dom.ParentNode. internalRemoveChild(ParentNode.java:500) at java.xml/com.sun.org.apache.xerces.internal.dom.ParentNode. removeChild(ParentNode.java:480) at writer2latex.xhtml.TextConverter.handleParagraph(T extConverter.java:604) at writer2latex.xhtml.TextConverter.traverseBlockText (TextConverter.java:244) at writer2latex.xhtml.TextConverter.traverseBlockText (TextConverter.java:181) at writer2latex.xhtml.TextConverter.convertTextConten t(TextConverter.java:138) at writer2latex.xhtml.Converter.convertInner(Converte r.java:296) at writer2latex.base.ConverterBase.convert(ConverterB ase.java:128) at writer2latex.base.ConverterBase.convert(ConverterB ase.java:103) at writer2latex.epub.EPUBConverter.convert(EPUBConver ter.java:48) at writer2latex.base.ConverterBase.convert(ConverterB ase.java:96) at writer2latex.Application.doConversion(Application. java:279) at writer2latex.Application.main(Application.java:93) If I go back to the last odt file I converted to epub in Sigil/ODTimport last summer, I can import a copy and convert to epub ok so the tool combination is not broken. The problem would seem to be in my new Writer odt file. Can anyone suggest what the problem could be and where to look for correcting it? |
04-09-2022, 02:02 PM | #41 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
I've just tested the plugin on my Arch Linux machine with the latest JRE, and it worked fine.
Since the plugin comes with Writer2LaTeX 1.6.0, maybe replacing writer2latex.jar with the Writer2LaTeX 1.6.1 .jar file might help. You can check which version is installed by looking at the HTML source code of converted .odt files. Spoiler:
If it doesn't say Writer2xhtml ver. 1.6.1., you're still using Writer2LaTeX 1.6.0. (You can download Writer2LaTeX 1.6.1 from the author's website.) Please note that the 1.9.x versions don't support .epub output and can't be used with this plugin. If replacing Writer2LaTeX 1.6.0 with Writer2LaTeX 1.6.1 didn't help, you might have to upgrade/downgrade JRE/Java. It also couldn't hurt to save your .odt file as a .docx file and then save it as an .odt file again. |
04-09-2022, 06:36 PM | #42 | |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Quote:
I did have the older Writer2Latex 1.6.0 so I fetched 1.6.1 and swapped out the writer2latex.jar file in the ODTimport plugin. That appears to have fixed the problem and Sigil has now converted my odt file to epub. Just remains now to tune up the epub a bit to correspond with my own style.css file. Thanks for the help. |
|
04-11-2022, 07:06 AM | #43 |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
ODTimport config file
I spent some time editing the config.xml in ODTimport after reading the writer2latex user manual. I managed to get most things working the way I wanted especially getting my LO Writer styles mapped. I found that Writer's Text Body style mapped to a bog-standard <p> no matter what I called my corresponding css style. I suppose there is an understandable logic to that so I found a workaround.
I did not have any success with mapping my list styles but I can live with correcting those in the epub file with Sigil after conversion. Where I absolutely failed was in getting my personal StyleSheet.css file recognised and imported. I tried all the variations I could think of when editing the config line: <option name="custom_stylesheet" value=" " /> but never hit the sweet spot so the resulting epub had my style names correctly shown in all the xhtml files but the styles were not implemented because I had failed to get my stylesheet linked in. My workaround was to place a copy of my stylesheet in the ODTimport plugin directory and rename it to epub.css. That worked. Could someone please explain the correct formula for getting an external stylesheet linked in automatically during the conversion? |
04-11-2022, 12:33 PM | #44 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(To keep the plugin code simple, the plugin will look for an epub.css file in the plugin folder.) |
|
04-11-2022, 02:32 PM | #45 |
Groupie
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
|
Well, thanks. I got there then although I made it a bit more difficult for myself by relying too much on the writer2latex user manual.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 AM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 02:25 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 |