Markdown4j - Use java to generate markdown file

Overview

markdown4j

Build Status license maven

Use java to generate markdown file.

Ref:

https://commonmark.org/

maven


   
  
    
     fun.mingshan
    
  
    
     markdown4j
    
  
    
     1.0
    

   

How to use?

rows = new ArrayList<>(); TableBlock.TableRow tableRow1 = new TableBlock.TableRow(); tableRow1.setRows(Arrays.asList("小明", "29")); rows.add(tableRow1); TableBlock tableBlock = TableBlock.builder() .titles(Arrays.asList("姓名", "年龄")) .rows(rows) .build(); StringBlock imageBlock = ImageElement.builder() .imageUrl("https://pandao.github.io/editor.md/examples/images/7.jpg") .build().toBlock(); Markdown markdown = Markdown.builder() .name("测试文档") .block(codeBlock) .block(tableBlock) .block(imageBlock) .build(); MdWriter.write(markdown);">
CodeBlock codeBlock = CodeBlock.builder()
                .language(CodeBlock.Language.JAVA.getDesc())
                .content("function test() {\n" +
                "\tconsole.log(\"Hello world!\");\n" +
                "}").build();

List<TableBlock.TableRow> rows = new ArrayList<>();

TableBlock.TableRow tableRow1 = new TableBlock.TableRow();
tableRow1.setRows(Arrays.asList("小明", "29"));
rows.add(tableRow1);

TableBlock tableBlock = TableBlock.builder()
        .titles(Arrays.asList("姓名", "年龄"))
        .rows(rows)
        .build();

StringBlock imageBlock = ImageElement.builder()
        .imageUrl("https://pandao.github.io/editor.md/examples/images/7.jpg")
        .build().toBlock();

Markdown markdown = Markdown.builder()
        .name("测试文档")
        .block(codeBlock)
        .block(tableBlock)
        .block(imageBlock)
        .build();

MdWriter.write(markdown);
You might also like...

A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas.

A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas.

FileManager A GUI-based file manager based on a Java file management and I/O framework using object-oriented programming ideas. Enables folder creatio

Feb 7, 2022

Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats.

Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats.

Classpy Classpy is a GUI tool for investigating Java class file, Lua binary chunk, Wasm binary code, and other binary file formats. Inspiration This t

Dec 17, 2022

Generate Heroku-like random names to use in your Java applications

HaikunatorJAVA Generate Heroku-like random names to use in your java applications. Installation To install Haikunator add the following to your maven

Aug 28, 2022

A java agent to generate method mappings to use with the linux `perf` tool

perf-map-agent A java agent to generate /tmp/perf-pid.map files for just-in-time(JIT)-compiled methods for use with the Linux perf tools. Build Make

Jan 1, 2023

Generate getter and setter on Java with ease! PS: Intended to use for labs where typing them are still the norm!!

Generate getter and setter on Java with ease! PS: Intended to use for labs where typing them are still the norm!!

GenerateGetterSetter Generate getter and setter on Java with ease! PS: Intended to use for labs where typing them are still the norm!! How to use Clon

Jan 4, 2022

IntelliJ Platform plugin that shows the file name of the currently open file in the status bar.

IntelliJ Platform plugin that shows the file name of the currently open file in the status bar. Clicking shows a list of recent files.

May 9, 2022

A simple program that is realized by entering data, storing it in memory (in a file) and reading from a file to printing that data.

A simple program that is realized by entering data, storing it in memory (in a file) and reading from a file to printing that data.

Pet project A simple program that is realized by entering data, storing it in memory (in a file) and reading from a file to printing that data. It can

Apr 28, 2022

Generates a Proguard mapping file for use in obfuscating your Java projects.

Reaper Generates a Proguard mapping file for use in obfuscating your Java projects. Features Automatically checks for duplicate names. Interactive, in

Dec 29, 2022

A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use

lock-spring-boot-starter A distributed lock that supports the use of Redis and Zookeeper, out of the box, fast and easy to use 一款基于 Redis 和 Zookeeper

Oct 15, 2022

JavaCC - a parser generator for building parsers from grammars. It can generate code in Java, C++ and C#.

JavaCC Java Compiler Compiler (JavaCC) is the most popular parser generator for use with Java applications. A parser generator is a tool that reads a

Dec 27, 2022

Generate Java types from JSON or JSON Schema and annotates those types for data-binding with Jackson, Gson, etc

jsonschema2pojo jsonschema2pojo generates Java types from JSON Schema (or example JSON) and can annotate those types for data-binding with Jackson 2.x

Jan 5, 2023

Generate all call graph for Java Code.

Generate all call graph for Java Code.

README-en.md 1. 前言 在很多场景下,如果能够生成Java代码中方法之间的调用链,是很有帮助的。 IDEA提供了显示调用指定Java方法向上的完整调用链的功能,可以通过“Navigate - Call Hierarchy”菜单(快捷键:Ctrl+Alt+H)使用;Eclipse也提供

Jan 6, 2023

hella-html is a library that makes it hella easy to generate dynamic HTML in vanilla Java.

Hella easy HTML in Java hella-html is a library that makes it hella easy to generate dynamic HTML in vanilla Java. Very lightweight and fast, the prim

Nov 23, 2022

SitemapGen4j is a library to generate XML sitemaps in Java.

sitemapgen4j SitemapGen4j is a library to generate XML sitemaps in Java. What's an XML sitemap? Quoting from sitemaps.org: Sitemaps are an easy way fo

Dec 16, 2022

Community extension to generate a Java client from the provided Camunda 7 OpenAPI descitpion and also warp it into Spring Boot

Camunda Engine OpenAPI REST Client Java and Spring Boot This community extension is a convenience wrapper around the generated Java client from the Ca

Dec 28, 2022

A web application to generate Java source code with spring-boot and mybatis-plus

A web application to generate Java source code with spring-boot and mybatis-plus

A web application to generate Java source code with spring-boot and mybatis-plus. Also, The class of Domain,Mapper,XML of Mapper Interface,Service,Controller are included. You can change the data source what you want to generate for your project in app running without restart this code -generator application.

Aug 29, 2022

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.

Greetings, Java Hipster! Full documentation and information is available on our website at https://www.jhipster.tech/ Please read our guidelines befor

Jan 5, 2023

Distributed ID Generate Service

Leaf There are no two identical leaves in the world. — Leibnitz 中文文档 | English Document Introduction Leaf refers to some common ID generation schemes

Dec 29, 2022

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.

Greetings, Java Hipster! Full documentation and information is available on our website at https://www.jhipster.tech/ Please read our guidelines befor

Jan 5, 2023
Releases(v1.0)
Owner
Juntao Han
Juntao Han
cglib - Byte Code Generation Library is high level API to generate and transform Java byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

cglib Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to g

Code Generation Library 4.5k Jan 8, 2023
Development Driven Testing (DDT) lets you generate unit tests from a running application. Reproduce a bug, generate a properly mocked test

DDTJ: It kills bugs DDT is the flip side of TDD (Test-driven development). It stands for "Development Driven Tests". Notice that it doesn’t contradict

null 4 Dec 30, 2021
JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. Go check the README.md file to see how to use it.

JCLR JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. To start using it, go to the

Scythe 3 Aug 21, 2021
A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions

:>>> DEPRECATION NOTE <<<: Although still one of the most popular Markdown parsing libraries for the JVM, pegdown has reached its end of life. The pro

Mathias 1.3k Nov 24, 2022
Markdown language support for IntelliJ IDEA (abandonned).

idea-markdown Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode and Android Studio. This plugin is no more m

null 602 Dec 30, 2022
Markdown editor control for JavaFX

An advanced markdown-editor control for JavaFX.

Daniel Gyoerffy 23 Dec 28, 2022
neutriNote - Markdown + Math in Just 3 MB!

Official | FAQ | Documentation | Mastodon | XDA neutriNote (Community Edition) What is neutriNote? In a nutshell, all-in-one preservation of written t

AppML 186 Jan 3, 2023
IntelliJ Platform A full-featured WYSIWYG editor for markdown

markdown-editor IntelliJ Platform A full-featured WYSIWYG editor for markdown English Document 中文文档 Useful Links Custom Style Features Support three e

null 101 Dec 19, 2022
Generate flame graph in HTML format from jfr(Java Flight Recorder) file

jfr-flamegraph-generator Generate Flame Graph from .jfr file. Get Started Executable jar and executable binary for Linux, Windows and macOS are provid

Lawrence Ching 3 Sep 22, 2022