This is excellent stuff, thank you. I have been using Writer for years and struggling to get an odt document into a good epub with the least confusion and manual editing. (Currently on Writer 7.3.7.2, Calibre 7.2, on Pop_os 22.04, which is Ubuntu under the skin.)
Just to add another dimension, I recently started using Sigil as an experiment, since the window management of the Editor has become a bit iffy. There is a new version of Doitsu's ODT Import plugin for Sigil that is based on the writer2xhtml 1.7 tool. (
https://www.mobileread.com/forums/sh...d.php?t=274536)
I have been playing with this for just a week or so with a couple of book-length documents, so I am far from an expert, but it has some very nice features:
There is a config file that lets you fine tune it in extreme detail; I've hardly explored it except for break levels and dimension conversion.
I have it set to split on h1-h4, and that just simply works. Perfectly, with the h-levels respected in the epub. It builds a competent TOC from the levels as broken so you get the ideal 1 file per TOC entry.
I use a Writer template with my preferred styles pre-defined. I have a separate css file that matches...in that the class "indent" has a 1 cm indent in Writer and a 2em indent in the css file (for example). I have the Sigil ODT Import plugin set up to use my css file as a default.
So when I pull in an odt using my "indent" class...there it is in the epub, named "indent" and using the 2em indent. Same for other custom styles, "firstpara", "verse1", you name it. Superb.
But, on the downside, it makes it's own css as well, so I will also get an "indent" class in that file that uses the 1 cm from Writer. Easy enough to remove the competing file, but it is confusing.
Picture handling is almost non-existent, all need editing.
But on the whole, it is the best and easiest odt to epub converter I have found yet. And as I said, I've only just begun to explore it.
EDIT: thought of a couple other features: This produces no <span>s like the Calibre ODT importer. For bold and italic it simply uses <b> and <i> tags. No <div>s either. Very simple.