Git Product home page Git Product logo

tmorin / plantuml-libs Goto Github PK

View Code? Open in Web Editor NEW
124.0 4.0 24.0 714.32 MB

A set of PlantUML libraries and a NPM cli tool to design diagrams which focus on several technologies/approaches: Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), C4 Model or even EventStorming and more.

Home Page: https://tmorin.github.io/plantuml-libs

License: MIT License

Shell 1.56% JavaScript 8.58% TypeScript 89.86%
plantuml c4model eventstorming aws c4-diagram event-storming material-icon azure gcp simpleicons

plantuml-libs's Introduction

plantuml-libs

Continous Integration npm version

Presentation

This repository hosts a PlantUML lib which provides several packages. Each package focus on a particular technology/approach: Amazon Web Services (AWS), Azure, C4 Model or even EventStorming and more.

Additionally, a CLI utility, working with NodeJS, is also provided within the NPN package. Its purpose is to speed up the rendering of PlantUML source files, i.e. the generation of PNG.

Contributing

Thanks for your interest in contributing!

There are many ways to contribute to this project. Get started here.

Install

The library can be installed from several channels:

The PlantUML library

The library brings thousands of PlantUML artifacts. Therefore, a documentation is available to discover and pick the resources fulfilling your needs.

The documentation is a set of Markdown documents linked together which can be directly read from the GIT repository: ./distribution/README.md,

The documentation of the latest released version is also available on tmorin.github.io/plantuml-libs. It provides a search engine which should improve the discovery process ;).

The available packages:

Generate diagrams with gdiag

gdiag is a command CLI provided by the NPM package. It helps to quickly generate the diagrams embedded in *.puml or *.plantuml files.

gdiag

Render PlantUML diagrams discovered (*.{puml,plantuml}) in the working
directory.

Options:
      --version                 Show version number                    [boolean]
      --work-directory, --wd    The directory where the PlantUML files will be
                                discovered and rendered. [string] [default: "."]
      --tech-directory, --td    The directory where technical resources will be
                                stored.             [string] [default: ".gdiag"]
      --lib-directory, --ld     The directory where the library is located.
           [string] [default: "/home/tibo/git-perso/plantuml-libs/distribution"]
      --java-command, --jc      The command of the java binary.
                                                      [string] [default: "java"]
      --plantuml-version, --pv  The version of PlantUML to use.
                                                  [string] [default: "1.2021.7"]
  -c, --clean                   Delete recursively the pictures located in the
                                working directory.    [boolean] [default: false]
      --help                    Show help                              [boolean]

Alternatively, the command line plantuml-generator, from tmorin/plantuml-generator, can also be used.

Build the library

The build of the library is based on two steps:

  • generate a work directory (./.workdir/) which contains the library manifest, and some additional resources like Tera templates, pictures ...
  • generate the distribution directory (./distribution/) which contains the PlantUML resources as well as the documentation

Generate the work directory

npm run generate-library

Generate the distribution directory

docker run --rm \
  -v "$(pwd)/.workdir:/workdir" \
  -v "$(pwd)/distribution:/distribution" \
  thibaultmorin/plantuml-generator:1 \
  plantuml-generator library generate library.yaml \
  -c=All -O=/distribution

plantuml-libs's People

Contributors

cboran avatar dependabot[bot] avatar tmorin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

plantuml-libs's Issues

include remotely fail

Thank you for creating a great tool. ๐Ÿ™

I tried to write the file as follows, but I got an error and it did not work correctly

https://github.com/tmorin/plantuml-libs/blob/8978f181caf319de48f5e1bcb35c41b24a55997f/distribution/aws-20210730/Group/GroupAutoScaling.md

@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"

' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml

' loads the package bootstrap
include('aws-20210730/bootstrap')

' loads the Item which embeds the element GroupAutoScaling
include('aws-20210730/Group/GroupAutoScaling')

GroupAutoScaling('GroupAutoScaling', 'Group Auto Scaling', 'an optional tech label') {
  note as note
  the content of the boundary
  end note
}
@enduml

The error message is as follows

PlantUML 1.2021.7
<b>This version of PlantUML is 184 days old, so you should
<b>consider upgrading from https://plantuml.com/download
[From string (line 6) ]
@startuml
' configures the library
!global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"
' loads the library's bootstrap
!include $LIB_BASE_LOCATION/bootstrap.puml
Cannot open URL

I couldn't seem to open the URL, so I rewrote it and tried again.

@startuml
- ' configures the library
- !global $LIB_BASE_LOCATION="https://github.com/tmorin/plantuml-libs/distribution"
- 
- ' loads the library's bootstrap
- !include $LIB_BASE_LOCATION/bootstrap.puml

+ !include https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml

' loads the package bootstrap
include('aws-20210730/bootstrap')

' loads the Item which embeds the element GroupAutoScaling
include('aws-20210730/Group/GroupAutoScaling')

GroupAutoScaling('GroupAutoScaling', 'Group Auto Scaling', 'an optional tech label') {
  note as note
  the content of the boundary
  end note
}
@enduml

The error message is as follows

PlantUML 1.2021.7
<b>This version of PlantUML is 184 days old, so you should
<b>consider upgrading from https://plantuml.com/download
[From https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml (line 79) ]
@startuml
' configures the library
' loads the library's bootstrap
!include https://raw.githubusercontent.com/tmorin/plantuml-libs/master/distribution/bootstrap.puml
...
... ( skipping 156 lines )
...
!procedure GroupElement($id, $stereotype, $name="", $tech="")
!local $V=""
!if ($name != "") && ($tech != "")
!$V=$V + $name + "\n" + "<size:" + $FONT_SIZE_XS + "><color:" + $FONT_COLOR_LIGHT + ">[" + $tech + "]</color></s ...
!elseif ($name != "")
!$V=$V + $name
!elseif ($tech != "")
!$V=$V + "<size:" + $FONT_SIZE_XS + "><color:" + $FONT_COLOR_LIGHT + ">[" + $tech + "]</color></size>"
!endif
!if ($V != "")
Rectangle $id <<$stereotype>> as "$V"
!else
Rectangle $id <<$stereotype>>
!endif
!endprocedure
' loads the package bootstrap
include('aws-20210730/bootstrap')
!include $LIB_BASE_LOCATION/$resource.puml
Cannot open URL

Will this be solved by rewriting https://github.com to https://raw.githubusercontent.com in all code ?

I'm sorry if I'm missing the point.

Issue when using this library

Hi,

When I try to use the event storming library to create a diagram I get the error in attachment.
Is this a know issue?

Kind regards
Robin
test_event_storming

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.