Giter Site home page Giter Site logo

md2odt's Introduction

MD2odt

Build Status codecov

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

Features

  • Input can be either plain Markdown file or ZIP file with one Markdown file and resources (images)
  • Support for complete Markdown syntax
  • Support for various Markdown extensions (turned off by default)
    • Autolinks
    • Emoji :octopus:
    • Strikethrough ~~something wrong~~
    • Subscript H~2~O
    • Superscript x^2^
    • Tables
    • Table of contents
  • Syntax highlighting (all common languages)
  • Support for both local and remote images (PNG, JPG, GIF, BMP, SVG)
  • Support for templates – template is a regular ODF file with custom styles, front page, header, footer, etc.

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();
    }
}

Example files

License

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

md2odt's People

Contributors

balounj avatar hartrik avatar mazinv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fgoalabre

md2odt's Issues

List Style

Set TextStyleNameAttribute to List using a StyleNames.LIST value.

Log adding images

It is a complicated and long running task that should be logged.

Suggestion

In two steps

  • before: downloading image / adding local image...
  • after: image added (or print error...)

listy

Implementovat víceúrovňový list.

[ODT] Joined code blocks

Example input:

```java
first block
```

```java
second block
```

... looks like one code block.

odt modifikace

Pokud by šlo programově rozbalit odt file, upravit a znovu zabalit do spustitelného.

Ideálně nějaký neprázdný dokument -> v contextu jen změnit dané slovo v dokumentu a uložit.
Při změně bacha ať obsahuje stejný počet znaků (mohlo by dělat problém v meta.xml).

Fill Readme.md

  • description
  • features (+extensions)
  • technologies?
  • API use
  • build, maven dep.

Broken output

Example (from our README.md):

[![Build Status](https://travis-ci.org/abcBHM/MD2odt.svg?branch=master)](https://travis-ci.org/abcBHM/MD2odt)
[![codecov](https://codecov.io/gh/abcBHM/MD2odt/branch/master/graph/badge.svg)](https://codecov.io/gh/abcBHM/MD2odt)
[![](https://jitpack.io/v/abcBHM/MD2odt.svg)](https://jitpack.io/#abcBHM/MD2odt)

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.