ZABW to Markdown
Nothing you choose here leaves your browser, and nothing is downloaded to make it work — not a library, not a reader, nothing. A .zabw is an AbiWord document through gzip, and your browser already knows how to gunzip; reading the XML underneath needs no library at all.
Markdown, with the headings as # and ##.
The heading levels come straight across, emphasis becomes asterisks and the rest is the words. Markdown treats a run of spaces inside a paragraph as insignificant, which is its own rule rather than something lost here.
What an AbiWord file actually is
That same XML file, gzipped — one document holding its own styles, its metadata and its text together, with no container around it. That makes it the simplest word-processor format on this site: a DOCX is a ZIP of a dozen parts and an ODT is a ZIP of four, and an AbiWord document is a file you can open in a text editor and read.
A heading here really is a style called “Heading 1”
Which is worth saying because on this site it is the
exception. In an OpenDocument file the style that makes text italic is
called Emphasis by one program and T1 by
another, so those pages resolve a style to what it DECLARES and ignore
what it is called. AbiWord has no such property to resolve: its built-in
styles are named Heading 1 to Heading 4 and the
name is the mechanism. So the name is matched, deliberately.
And a style can be used without being defined
AbiWord's own test document for its style system has
five paragraph styles that no <styles> entry ever
defines — including the one it uses for a heading, which its own
text points out:
Heading 4 is not defined yet, so we ignore it when formatting.
A reader that looks every style up and trusts the answer gets nothing at all for those paragraphs. They are still headings; the document simply never wrote the definition down. That is handled here, and it was found by reading a file AbiWord wrote rather than by reading the specification — whose own wiki calls it very much out of date.
What it will not do
- Pictures do not come across. AbiWord keeps them base64-encoded in a block at the end and refers to them from a frame positioned on the page, and a frame is a position rather than a place in the text.
- Lists are not read. Neither document this was measured against has one, and a list reader nobody has run against a real file is a list reader that does not work.
- The page layout goes, as it must: margins and page breaks mean nothing in something that reflows.