jbendotnet / plantuml-converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plantuml-converter

The plantuml-converter will scan files and parse plantuml blocks and generate a link with the png representation of the diagram. For example adding this block to your Readme. <!-- .. --> will make sure that the content is not printed.

<!-- @startuml
start
:Hello world;
:This is defined on
several **lines**;
stop
@enduml -->
![](https://plantuml.signavio.com/png/UDe4mC49W30C1T1xfiWv8xGBE80B5Fh5G6YaF-ZwFjRO9Ur0HEgNEsQNTjvETUh4vGjJSmdnOezGi_05cdLXvID_0000___ImHMY)

See also pre-commit usage

Install

Install from releases

curl -L https://github.com/signavio/plantuml-converter/releases/latest/download/plantuml-converter_$(uname -s)_amd64.gz -o plantuml-converter.gz
gunzip plantuml-converter.gz && chmod +x plantuml-converter && sudo mv plantuml-converter /usr/local/bin/plantuml-converter
plantuml-converter --help

Versioning

Versioning is done automatically done with Semantics. To increase the version any commit in master branch should start with major:, minor: or patch:. If you squash merge make sure your git message aka Merge Request Title starts with one of these. Once the branch was merged to master, semantics will create an incremented git tag. Additional the cross-compiled binaries for windows, darwin and linux will be uploaded to releases.

Class diagram

The following diagram describes the current program classes:

Infrastructure

Current infrastructure of this application:

Usage

Quicklinks

Usage with pre-commit

You can auto-generate links to the png representation of the diagram. The tool will generate and update those links in Readme's. You can use pre-commit to automate that process before each commit.

First add .pre-commit-config.yaml to your repository root with following content

repos:
  - repo: https://github.com/signavio/plantuml-converter
    rev: master
    hooks:
      - id: plantuml_coverter

Make sure you have installed pre-commit and plantuml-converter see section Install. Install the hook

pre-commit install
# optional to test the hook you can run
pre-commit run -a

By default the tool will check all files with *.md extension. Now links will be generated before each commit.

About


Languages

Language:Go 98.6%Language:Shell 1.4%