Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 2.57 KB

README.md

File metadata and controls

74 lines (48 loc) · 2.57 KB

PlantUML skinparam parser

"Writing a really general parser is a major but different undertaking, by far the hardest points being sensitivity to context and resolution of ambiguity." ~ Graham Nelson

Quick and dirty script to parse all available skinparam from the PlantUML code base.

Introduction

PlantUML is a great tool for drawing UML diagrams. It supports many diagrams and has lots of features.

One such feature, skinparam allows changing the way diagrams look (or behave).

Sadly, PlantUML also has some shortcomings, mostly in terms of documentation.

The manual mentions skinparam and there is a command[1] to show a list of available skinparam but neither are complete.

This project offers a quick-and-dirty way of listing all available skinparam.

The full list is available in the build directory.

The list is created by parsing the Java code. The code that does this is written in PHP[2].

Usage

There is a full list of skinparam available in the build directory. There is also a list with skinparam default values.

At a later point, a file will be added that defines constants for the values rather than hard-coding them.

The simplest thing is to just use those files.

Parsing a list from the PlantUML code

To create a list, the following steps need to be taken:

  1. Download the PlantUML source-code
  2. Download this project
  3. Run the parser: ./bin/parse-skinparam <plantuml-source-directory>.
  4. ...
  5. Profit!

For instance:

cd /tmp
git clone https://github.com/plantuml/plantuml.git
git clone https://github.com/potherca-blog/plantuml-skinparam-parser.git

/tmp/plantuml-skinparam-parser/bin/parse-skinparam /tmp/plantuml/

Colophon

Footnotes

  1. java -jar plantuml.jar -language
  2. I did say "quick" and "dirty"