Giter Site home page Giter Site logo

odttomd's Introduction

OdtToMd

ODT (OpenDocument Text) to MD (Markdown) converter.

License: Public domain. Use at your own risk. There is absolutely no warranty of any kind.

Features

  • paragraphs, line breaks inside a paragraph
  • headings (with automatic numbering)
  • bullet lists and numbered lists (multi-level)
  • bold
  • links

Hints

  • 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)

Build

  • implementation language: C, C++11
  • platform: independent
  • latest source code: https://github.com/milan11/odttomd
  • source code distribution: as CMake project
  • build dependencies:
    • boost
    • expat
    • libzip
  • used libraries included in the project (not build dependencies):
  • build steps:
  • 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++

Supported Environment

  • OS: Linux tested only (but should be multiplatform)
  • needs these libraries (is dynamically linked with):
    • expat
    • libzip

Usage

Simple

odttomd odt_file > md_file

Output types

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

Error reporting

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.

Examples

odttomd's People

Contributors

milan11 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.