<commit_before># Java Markdown Generator
[![Travis](https://img.shields.io/travis/Steppschuh/Java-Markdown-Generator.svg)](https://travis-ci.org/Steppschuh/Java-Markdown-Generator/) [![Bintray](https://api.bintray.com/packages/steppschuh/Markdown-Generator/Markdown-Generator/images/download.svg) ](https://bintray.com/steppschuh/Markdown-Generator/Markdown-Generator/_latestVersion) [![Maven Central](https://img.shields.io/maven-central/v/net.steppschuh.markdowngenerator/markdowngenerator.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.steppschuh.markdowngenerator%22) [![Codecov](https://img.shields.io/codecov/c/github/Steppschuh/Java-Markdown-Generator.svg)](https://codecov.io/gh/Steppschuh/Java-Markdown-Generator)

Simple to use Java library to generate beautiful markdown.

![Screenshot](https://github.com/Steppschuh/Java-Markdown-Generator/blob/dev/Media/code_table_output.png)

# Usage

## Integration

### Gradle
```groovy
repositories {
    maven {
        url  "http://dl.bintray.com/steppschuh/Markdown-Generator"
    }
}
dependencies {
    compile 'net.steppschuh.markdowngenerator:markdowngenerator:1.3.0.0'
}
```

### Maven
```xml
<dependency>
  <groupId>net.steppschuh.markdowngenerator</groupId>
  <artifactId>markdowngenerator</artifactId>
  <version>1.3.0.0</version>
</dependency>
```

### JAR
You can download the latest .jar files from [GitHub](https://github.com/Steppschuh/Java-Markdown-Generator/releases) or [Bintray](https://bintray.com/steppschuh/Markdown-Generator/Markdown-Generator/).

## Examples

### Emphasis
```java
@Test
public void example() throws Exception {
    StringBuilder sb = new StringBuilder()
            .append(new Text("I am normal")).append("\n")
            .append(new BoldText("I am bold")).append("\n")
            .append(new ItalicText("I am italic")).append("\n")
            .append(new StrikeThroughText("I am strike-through"));

    System.out.println(sb);
}
```
**Output:**
```
I am normal
**I am bold**<commit_msg>Updated readme with new version<commit_after># Java Markdown Generator
[![Travis](https://img.shields.io/travis/Steppschuh/Java-Markdown-Generator.svg)](https://travis-ci.org/Steppschuh/Java-Markdown-Generator/) [![Bintray](https://api.bintray.com/packages/steppschuh/Markdown-Generator/Markdown-Generator/images/download.svg) ](https://bintray.com/steppschuh/Markdown-Generator/Markdown-Generator/_latestVersion) [![Maven Central](https://img.shields.io/maven-central/v/net.steppschuh.markdowngenerator/markdowngenerator.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.steppschuh.markdowngenerator%22) [![Codecov](https://img.shields.io/codecov/c/github/Steppschuh/Java-Markdown-Generator.svg)](https://codecov.io/gh/Steppschuh/Java-Markdown-Generator)

Simple to use Java library to generate beautiful markdown.

![Screenshot](https://github.com/Steppschuh/Java-Markdown-Generator/blob/dev/Media/code_table_output.png)

# Usage

## Integration

### Gradle
```groovy
repositories {
    maven {
        url  "http://dl.bintray.com/steppschuh/Markdown-Generator"
    }
}
dependencies {
    compile 'net.steppschuh.markdowngenerator:markdowngenerator:1.3.1.1'
}
```

### Maven
```xml
<dependency>
  <groupId>net.steppschuh.markdowngenerator</groupId>
  <artifactId>markdowngenerator</artifactId>
  <version>1.3.1.1</version>
</dependency>
```

### JAR
You can download the latest .jar files from [GitHub](https://github.com/Steppschuh/Java-Markdown-Generator/releases) or [Bintray](https://bintray.com/steppschuh/Markdown-Generator/Markdown-Generator/).

## Examples

Most Markdown elements have static convenience methods in the `Markdown` class. You can also use their repesctive constructors, as shown below. 

### Emphasis
```java
@Test
public void example() throws Exception {
    StringBuilder sb = new StringBuilder()
            .append(new Text("I am normal")).append("\n")
            .append(new BoldText("I am bold")).append("\n")
            .append(new ItalicText("I am italic")).append("\n")
            .append(new StrikeThroughText("I am strike-through"));

    System.out.println(sb);
}
```
**Output:**
```
I am normal
**I am bold**
{'fraction_non_alphanumeric': 0.1653031761308951, 'fraction_numerical': 0.008180943214629451, 'mean_word_length': 4.773611111111111, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2906917', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1372, 'n_words': 198}