Skip to content

lonnblad/gopuml

Repository files navigation

Build Status Go Report Card Coverage Status

gopuml

This a tool to compile Plant UML into files and links.

Table of Contents

Usage

Install

go get -u github.com/lonnblad/gopuml

Compiling UML

The command used to compile the Plant UML to different formats.

gopuml build

Options

  • -f, --format

    The format to use when compiling the Plant UML, defaults to: svg.

    Supported formatters are:

    • png, will format the content as .png
    • svg, will format the content as .svg
    • txt, will format the content as .txt
  • --server

    The Server URL to use when the style used is link, defaults to: https://www.planttext.com/api/plantuml.

  • --style

    The style to use when compiling the Plant UML, defaults to: file.

    Supported styles are:

    • file, will write the formatted content to a file
    • link, will write a link to the formatted content to stdout
    • out, will write the formatted content to stdout

Examples

These examples can be found here.

The source Plant UML.

@startuml Example
Bob -> Alice : hello
@enduml

Compile files

Compiles example.png.

gopuml build -f png example/example.puml

example.png

Compiles example.svg.

gopuml build -f svg example/example.puml

example.svg

Compiles example.txt.

gopuml build -f txt example/example.puml

     ┌───┐          ┌─────┐
     │Bob│          │Alice│
     └─┬─┘          └──┬──┘
       │    hello      │
       │──────────────>│
     ┌─┴─┐          ┌──┴──┐
     │Bob│          │Alice│
     └───┘          └─────┘

Generate links

Generates a link for the example.png.

gopuml build -f png --style link example/example.puml

Generates a link for the example.svg.

gopuml build -f svg --style link example/example.puml

Generates a link for the example.txt.

gopuml build -f txt --style link example/example.puml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages