ODT (OpenDocument Text) to MD (Markdown) converter.
License: Public domain. Use at your own risk. There is absolutely no warranty of any kind.
- paragraphs, line breaks inside a paragraph
- headings (with automatic numbering)
- bullet lists and numbered lists (multi-level)
- to help OdtToMd understand the input file, prefer using styles for formatting – e.g. in LibreOffice:
- Paramgraph Styles to create paragraphs and headings (configure automatic heading numbering using Tools -> Outline Numbering...)
- List Styles to create lists (control levels using Demote One level and Promote One Level buttons on the Bullets and Numbering toolbar)
- Character Styles to control in-line formatting (e.g. create some style for the bold text)
- implementation language: C, C++11
- platform: independent
- latest source code: https://github.com/milan11/odttomd
- source code distribution: as CMake project
- build dependencies:
- used libraries included in the project (not build dependencies):
- build steps:
- git clone firstname.lastname@example.org:milan11/odttomd.git
- cd odttomd
- possible CMake arguments:
- debug build: -DCMAKE_BUILD_TYPE=Debug
- force using gcc compiler: -DCMAKE_CXX_COMPILER=g++
- force using clang compiler: -DCMAKE_CXX_COMPILER=clang++
- OS: Linux tested only (but should be multiplatform)
- needs these libraries (is dynamically linked with):
odttomd odt_file > md_file
Use --profile option to specify output type:
- standard – standard Markdown format
- github – GitHub Flavored Markdown
- plain_text – without Markdown marks and not usable as Markdown (e.g. tries to preserve numbering formats from ODT, but some of these formats cannot be understood by Markdown parsers)
- readable – more human-readable when opening as text
- parseable – uses more straightforward rules which allows simpler parsing
Non-zero exit status means a fatal error (invalid format, read / write error).
Unsupported data of the input odt_file is reported as a warning to standard error output (and some defaults are used instead) – this does not change the exit status.