Compare commits

..

13 Commits
0.1.2 ... 0.1.5

Author SHA1 Message Date
Robert Winkler
609dcbc7d5 Merge remote-tracking branch 'origin/master' 2015-11-12 10:57:49 +01:00
Robert Winkler
4e61063106 Added method sectionTitleLevel4 2015-11-12 10:57:40 +01:00
Robert Winkler
b7cad8a7c8 Updated documentation 2015-07-09 08:11:01 +02:00
Robert Winkler
97b068150d Added twitter batch 2015-06-16 08:31:27 +02:00
Robert Winkler
c1327e6b90 Fixed SECTION_TITLE_LEVEL3 in Markdown enum 2015-05-18 12:32:17 +02:00
Robert Winkler
68c101fced Merge pull request #1 from BuJo/markdown-level3
Fix Markdown level 3 title
2015-05-15 22:10:28 +02:00
Jonathan Buch
02ea0f4e54 Fix Markdown level 3 title 2015-05-15 17:33:07 +02:00
Robert Winkler
3933836290 Updates documentation 2015-05-01 19:48:20 +02:00
Robert Winkler
9471093dce Updated documentation 2015-04-30 18:10:27 +02:00
Robert Winkler
15a96a7338 Updated documentation 2015-04-24 12:53:02 +02:00
Robert Winkler
e6dc1b63d0 Added Apache2 Copyright Header 2015-04-24 08:25:17 +02:00
Robert Winkler
1dd8dd2d25 New version number 2015-04-20 09:01:29 +02:00
Robert Winkler
2657b03de0 Merge branch 'release/0.1.2' 2015-04-15 16:08:20 +02:00
13 changed files with 238 additions and 15 deletions

View File

@@ -1,13 +1,13 @@
= MarkupDocBuilder
:author: Robert Winkler
:version: 0.1.2
:version: 0.1.4
:hardbreaks:
image:https://travis-ci.org/RobWin/markup-document-builder.svg["Build Status", link="https://travis-ci.org/RobWin/markup-document-builder"] image:https://coveralls.io/repos/RobWin/markup-document-builder/badge.svg["Coverage Status", link="https://coveralls.io/r/RobWin/markup-document-builder"] image:https://api.bintray.com/packages/robwin/maven/markup-document-builder/images/download.svg[link="https://bintray.com/robwin/maven/markup-document-builder/_latestVersion"] image:http://img.shields.io/badge/license-ASF2-blue.svg["Apache License 2", link="http://www.apache.org/licenses/LICENSE-2.0.txt"]
image:https://travis-ci.org/Swagger2Markup/markup-document-builder.svg?branch=master["Build Status", link="https://travis-ci.org/Swagger2Markup/markup-document-builder"] image:https://coveralls.io/repos/RobWin/markup-document-builder/badge.svg["Coverage Status", link="https://coveralls.io/r/RobWin/markup-document-builder"] image:https://api.bintray.com/packages/robwin/maven/markup-document-builder/images/download.svg[link="https://bintray.com/robwin/maven/markup-document-builder/_latestVersion"] image:http://img.shields.io/badge/license-ASF2-blue.svg["Apache License 2", link="http://www.apache.org/licenses/LICENSE-2.0.txt"] image:https://img.shields.io/badge/Twitter-rbrtwnklr-blue.svg["Twitter", link="https://twitter.com/rbrtwnklr"]
== Overview
This project is a Markup document builder (AsciiDoc and Markdown). The primary goal of this project is to simplify the creation of Markup documents.
This project is a Markup document builder (AsciiDoc and Markdown). The primary goal of this project is to simplify the creation of Markup documents. The builder is used by https://github.com/RobWin/swagger2markup[swagger2markup].
The project requires at least JDK 7.
@@ -33,7 +33,7 @@ The project is published in JCenter and Maven Central.
<dependency>
<groupId>io.github.robwin</groupId>
<artifactId>markup-document-builder</artifactId>
<version>0.1.2</version>
<version>0.1.4</version>
</dependency>
----
@@ -45,7 +45,7 @@ repositories {
jcenter()
}
compile "io.github.robwin:markup-document-builder:0.1.2"
compile "io.github.robwin:markup-document-builder:0.1.4"
----
=== Using MarkupDocBuilder
@@ -113,3 +113,13 @@ You can generate your PDF or HTML documentation via https://github.com/asciidoct
image::images/asciidoc_html.jpg[asciidoc_html]
== License
Copyright 2015 Robert Winkler
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

View File

@@ -4,4 +4,16 @@
* Initial version with support for AsciiDoc and Markdown
=== Version 0.1.1
* Signed jar files
* Signed jar files
=== Version 0.1.2
* Removed logback from compile dependency
=== Version 0.1.3
* Removed commons.io from compile dependency
=== Version 0.1.4
* Fixed SECTION_TITLE_LEVEL3 in Markdown enum
=== Version 0.1.5
* Added SECTION_TITLE_LEVEL4

View File

@@ -6,14 +6,14 @@ buildscript {
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
classpath 'io.spring.gradle:dependency-management-plugin:0.3.1.RELEASE'
classpath 'io.spring.gradle:dependency-management-plugin:0.5.0.RELEASE'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
classpath 'org.asciidoctor:asciidoctorj:1.5.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
}
}
description = 'A Markup (Markdown, AsciiDoc) document builder'
version = '0.1.2'
version = '0.1.5'
group = 'io.github.robwin'
apply plugin: 'java'
@@ -39,16 +39,16 @@ repositories {
}
dependencies {
compile 'commons-io:commons-io'
compile 'ch.qos.logback:logback-classic'
compile 'org.slf4j:slf4j-api'
testCompile 'junit:junit'
testCompile 'ch.qos.logback:logback-classic'
}
dependencyManagement {
dependencies {
"commons-io:commons-io" "2.4"
"ch.qos.logback:logback-classic" "1.1.2"
"junit:junit" "4.11"
dependency "org.slf4j:slf4j-api:1.7.12"
dependency "junit:junit:4.11"
dependency "ch.qos.logback:logback-classic:1.1.2"
}
}

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
import org.slf4j.Logger;
@@ -39,6 +57,10 @@ public abstract class AbstractMarkupDocBuilder implements MarkupDocBuilder {
documentBuilder.append(markup).append(title).append(newLine);
}
protected void sectionTitleLevel4(Markup markup, String title){
documentBuilder.append(markup).append(title).append(newLine);
}
@Override
public MarkupDocBuilder textLine(String text){
documentBuilder.append(text).append(newLine);

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
/**

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
import java.io.IOException;
@@ -18,6 +36,8 @@ public interface MarkupDocBuilder {
MarkupDocBuilder sectionTitleLevel3(String title);
MarkupDocBuilder sectionTitleLevel4(String title);
MarkupDocBuilder textLine(String text);
MarkupDocBuilder paragraph(String text);

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
@@ -9,7 +27,7 @@ import io.github.robwin.markup.builder.markdown.MarkdownBuilder;
*/
public final class MarkupDocBuilders {
private MarkupDocBuilders(){};
private MarkupDocBuilders(){}
public static MarkupDocBuilder documentBuilder(MarkupLanguage markupLanguage){
switch(markupLanguage){

View File

@@ -1,3 +1,22 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
import java.util.Arrays;

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder.asciidoc;
@@ -16,6 +34,7 @@ public enum AsciiDoc implements Markup {
SECTION_TITLE_LEVEL1("== "),
SECTION_TITLE_LEVEL2("=== "),
SECTION_TITLE_LEVEL3("==== "),
SECTION_TITLE_LEVEL4("===== "),
BOLD("*"),
ITALIC("_"),
LIST_ENTRY("* "),

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder.asciidoc;
import io.github.robwin.markup.builder.AbstractMarkupDocBuilder;
@@ -42,6 +60,12 @@ public class AsciiDocBuilder extends AbstractMarkupDocBuilder {
return this;
}
@Override
public MarkupDocBuilder sectionTitleLevel4(String title){
sectionTitleLevel3(AsciiDoc.SECTION_TITLE_LEVEL4, title);
return this;
}
@Override
public MarkupDocBuilder paragraph(String text){
paragraph(AsciiDoc.HARDBREAKS, text);

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder.markdown;
import io.github.robwin.markup.builder.Markup;
@@ -13,7 +31,8 @@ public enum Markdown implements Markup {
DOCUMENT_TITLE("# "),
SECTION_TITLE_LEVEL1("## "),
SECTION_TITLE_LEVEL2("### "),
SECTION_TITLE_LEVEL3("### "),
SECTION_TITLE_LEVEL3("#### "),
SECTION_TITLE_LEVEL4("##### "),
BOLD("**"),
ITALIC("*"),
LIST_ENTRY("* ");

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder.markdown;
import io.github.robwin.markup.builder.AbstractMarkupDocBuilder;
@@ -43,6 +61,12 @@ public class MarkdownBuilder extends AbstractMarkupDocBuilder
return this;
}
@Override
public MarkupDocBuilder sectionTitleLevel4(String title){
sectionTitleLevel3(Markdown.SECTION_TITLE_LEVEL4, title);
return this;
}
@Override
public MarkupDocBuilder paragraph(String text){
paragraph(Markdown.HARDBREAKS, text);

View File

@@ -1,3 +1,21 @@
/*
*
* Copyright 2015 Robert Winkler
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
*/
package io.github.robwin.markup.builder;
import org.junit.Before;