Skip to content

Latest commit

 

History

History
76 lines (58 loc) · 1.77 KB

README.md

File metadata and controls

76 lines (58 loc) · 1.77 KB

MD2odt

Build Status codecov

WORK IN PROGRESS

MD2odt is a easy to use library for converting Markdown to OpenDocument (.odt).

Features

  • Supports templates

  • Supports various Markdown extensions

    • Autolinks
    • Emoji
    • Strikethrough
    • Subscript
    • Superscript
    • Tables
    • Table of contents
  • Syntax highlighting

Example

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Dependency:

<dependency>
    <groupId>com.github.abcBHM</groupId>
    <artifactId>MD2odt</artifactId>
    <version>master-SNAPSHOT</version>
</dependency>

Source code

import cz.zcu.kiv.md2odt.MD2odt;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;

public class Example {

    public static void main(String... args) throws IOException {
        MD2odt.converter()
                .setInput(Paths.get("example.md"), StandardCharsets.UTF_8)
                .setTemplate(Paths.get("template.odt"))
                .setOutput(Paths.get("result.odt"))
                .enableAllExtensions()
                .convert();
    }
}

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.