Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uniqueck/asciidoctorj-liquibase-extension
An AsciidoctorJ extension to generate an entity relationship model based on liquibase changesets
https://github.com/uniqueck/asciidoctorj-liquibase-extension
asciidoc asciidoctor asciidoctor-extension asciidoctorj erm liquibase plantuml
Last synced: 10 days ago
JSON representation
An AsciidoctorJ extension to generate an entity relationship model based on liquibase changesets
- Host: GitHub
- URL: https://github.com/uniqueck/asciidoctorj-liquibase-extension
- Owner: uniqueck
- License: mit
- Created: 2019-10-21T21:54:41.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-25T21:41:23.000Z (about 3 years ago)
- Last Synced: 2023-07-03T10:43:29.401Z (over 1 year ago)
- Topics: asciidoc, asciidoctor, asciidoctor-extension, asciidoctorj, erm, liquibase, plantuml
- Language: Java
- Homepage:
- Size: 178 KB
- Stars: 15
- Watchers: 5
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
:icons: font
:version: 1.0-SNAPSHOT
:imagesdir: doc/images
= AsciidoctorJ Liquibase Extensionimage:https://github.com/uniqueck/asciidoctorj-liquibase-extension/actions/workflows/ci.yaml/badge.svg?branch=master["GitHub Actions", link="https://github.com/uniqueck/asciidoctorj-liquibase-extension/actions/workflows/ci.yaml?branch=master"]
image:https://img.shields.io/badge/License-MIT-yellow.svg["MIT License", link="https://opensource.org/licenses/MIT"]
image:https://maven-badges.herokuapp.com/maven-central/de.uniqueck.asciidoctorj.extensions/asciidoctorj-liquibase-extension/badge.svg?style=plastic[link="https://maven-badges.herokuapp.com/maven-central/de.uniqueck.asciidoctorj.extensions/asciidoctorj-liquibase-extension"]This AsciidoctorJ extension provides a macro to generate a entity relationship diagram based on https://www.liquibase.org/index.html[liquibase] changeset files. Currently only xml format for liquibase changeset files are supported.
This extensions needs __asciidoctor-diagram__ extension to work probably.== Installation
To use this extension declare it as a dependency in https://github.com/asciidoctor/asciidoctor-maven-plugin[asciidoctor-maven-plugin] configuration or https://asciidoctor.org/docs/asciidoctor-gradle-plugin/[asciidoctor-gradle-plugin].
Prerequisites:
* graphviz - https://graphviz.org/[subs="attributes, verbatim"]
[source, xml]
----org.asciidoctor
asciidoctor-maven-plugin
LATEST
output-html
generate-resources
process-asciidoc
html
com.uniqueck
asciidoctorj-liquibase-extension
LATEST
----
<1> asciidoctorj-liquibase-extension is added
<2> check for the latest version at https://maven-badges.herokuapp.com/maven-central/de.uniqueck.asciidoctorj.extensions/asciidoctorj-liquibase-extension[Maven central]== How To Use
.liquibase macro without attributes
[source, asciidoc]
----
liquibase::src/test/resources/db/db.changelog-master.xml[]
----.Generated image for liquibase macro
image::db.changelog-master.png[].liquibase macro with attribute tillTag set to 1.X.FINAL
[source, asciidoc]
----
liquibase::src/test/resources/db/db.changelog-master.xml[tillTag=1.X.FINAL]
----.Generated image for liquibase macro with attribute tillTag
image::db.changelog-master_1.X.FINAL.png[].liquibase macro with attribute fileName set to diagram
[source, asciidoc]
----
liquibase::src/test/resources/db/db.changelog-master.xml[fileName = diagram]
----.liquibase macro with attribute outputFormat set to svg
[source, asciidoc]
----
liquibase::src/test/resources/db/db.changelog-master.xml[fileName = diagram, outputFormat = svg]
----=== Attributes
* *tillTag* parse liquibase changeset files only until tagDatabase matched definied value
* *fileName* generates a diagram with the specified file name.
* *outputFormat* generates a diagram with the specified format. Only png and svg formats are supported.*Note*: the fileName attribute has to be present for the output format to be considered.
== ToDo
* Styling of PlantUML like https://about.draw.io/entity-relationship-diagrams-with-draw-io/[Draw IO]
* Support both styles of ERD
* Styling options
** with or without datatypes
** line connections* see for grouping and associations http://plantuml.com/de/class-diagram
* see for entity relationship diagram http://plantuml.com/de/ie-diagram
* define how to detect cardinality of relationships