plantuml-wrapper

project-stage-shield license-shield Maintained standard-readme compliant Potherca

PlantUML Wrapper

Bash scripts to wrap calls to the PlantUML jar file and update PlantUML jars.

Install

To install this project:

This can be achieved by running:

git clone https://github.com/potherca-bash/plantuml-wrapper/ /usr/local/src/plantuml/ \
    && ln -s /usr/local/src/plantuml/plantuml.sh /usr/local/bin/plantuml \
    && bash /usr/local/src/plantuml/update-plantuml.sh

Newer versions of the scripts can be received by calling git -C /usr/local/src/plantuml/ pull.

Newer releases of PlantUML can be received by calling plantuml update, or by calling the update script directly: /usr/local/src/plantuml/update-plantuml.sh.

Dependencies

The wrapper script requires java. If no JVM can be found, the script will show an error.

The update script requires cURL and jq to be installed.

To keep the scripts up to date, git is advised, but not required (newer versions can be downloaded manually).

Usage

The executable /usr/local/bin/plantuml can be called simply by calling plantuml on the commandline. This can be validated by calling plantuml -version.

If this does not work, check that /usr/local/bin is present in the PATH environment variable. This can be done by calling printf '%s\n' "$PATH" | tr ':' '\n' | grep -x '/usr/local/bin'.

The executable /usr/local/bin/plantuml is symlinked to the wrapper script /usr/local/src/plantuml/plantuml.sh, which calls the /usr/local/src/plantuml/plantuml.jar.

The jar file is symlinked to the latest downloaded PlantUML jar file. This symlink is created by /usr/local/src/plantuml/update-plantuml.sh.

When the update script is called, it will fetch any available newer versions of PlantUML and update the plantuml.jar symlink to the latest jar.

Using other PlantUML versions

The version of PlantUML that is used can be set using the PLANTUML_JAR environment variable when calling the executable:

PLANTUML_JAR='plantuml-1.2024.7.jar' plantuml -version

Contributing

Questions or feedback can be given by opening an issue on GitHub.

Code changes can be suggested by opening a pull-request.

License

This project is created by under a Mozilla Public License 2.0 (MPL-2.0).