awesm

command module
v0.0.0-...-80b1462 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2018 License: MIT Imports: 6 Imported by: 0

README

Go Report Card CircleCI codebeat badge

AwesM - Awesome Modeling

AwesM is a tool that simplifies the generation of graphviz diagrams using the awesome modeling language. Currently, there is only an option to generate activity diagrams.

Installation

go get github.com/windler/AwesM

Make sure you have graphviz installed.

Usage

After creating a yaml file describing your diagram, you just call

awesm path/file.yaml

This will create a graph in top/down presentation. You can change to left/right by calling

awesm path/file.yaml LR

Activity diagram

Every activity diagram starts with the keyword activity. The start and end of the diagram are represented by the keywords start and end. The following keywords are possible:

Keyword Description
if Starts a condition. Multiple paths are allowed.
ifopt Starts a condition with only one subpath. A scecond path is directly connect with the join
fork Creates parallelizm. Multiple paths are allowed

Please read the following examples to fully understand the yaml structure.

Activity diagram examples

pizza order (left/right)

yaml-File:

activity:
    - start
    - order received
    - ifopt: 
        "comment from customer?":
            - consider comment
    - choose dough
    - choose sauce
    - choose toppings
    - fork:
        path1:
            - bake pizza
        path2:
            - organize driver
        path3:
            - calculate price
    - deliver
    - end
awesm examples/pizza.yaml LR

Output:
testoutput

waking up (top/down)

yaml-File:

activity:
    - start
    - wake up
    - stand up
    - if: 
        "not tired?":
            - shower
            - get clothed
        "tired?":
            - drink coffee
            - ifopt:
                "still tired?":
                    - fork:
                        path1:
                            - put on socks
                        path2:
                            - go to toilet
    - end
awesm examples/simple_test.yaml

Output:
testoutput

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
aml
mocks
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL