- Fork this repository on GitHub and then git clone it to your local machine.
- Add a new folder containing your library files on the
stdlibfolder. - Create this corresponding tree structure:
- Add a file inside your library's folder called
README.mdthat contains an YAML header:
---
name: <your library's name>
display_name:
description:
author:
version: <your library's version>
release:
license:
source: <[URL to your library's separate git repo where it is maintained]>
origin: <URL to the icon/stdlib origin website>
---
Information about the `<your library's name>` Standard Library.- Make changes to the root
README.mdfile to add your Library, describe it and add example. - Optionally add one or more themes for your library in the
./stdlib/[your library's name]/themesfolder- use the naming convention
puml-theme-[theme name].pumlto allow your users to use it via!theme [theme name] from <[your library's name]/themes>
- use the naming convention
- Commit your work and push it up to your fork repository
- Submit a Pull Request from your fork repository back to the main repository
The entire process is described on the official website
Dependencies: imagemagic, plantuml
#!/bin/bash
IMAGES_DIR=/path/to/images
RESULT_DIR=/path/to/results
TEMP_DIR_NAME=.plantuml.sprites
mkdir -p $TEMP_DIR_NAME
mkdir -p $RESULT_DIR
for i in `find $IMAGES_DIR -iname '*.png' -printf "%f\n" | sed 's/\.png//g'`; do
# Convert image to include white bg and correct size
convert $IMAGES_DIR/$i.png \
-background "#fff" \
-alpha remove \
-alpha off \
-resize 50x50 \
$TEMP_DIR_NAME/$i.plantuml.png
# Create sprites
plantuml -encodesprite 16 $TEMP_DIR_NAME/$i.plantuml.png > $RESULT_DIR/$i.plantuml
done
rm -rf $TEMP_DIR_NAME
The correct local workflow to build a plantuml.jar that includes stuff from plantuml/plantuml-stdlib:
- in local fork of
plantuml/plantuml-stdlibgradle run- copy files from
./output/to./src/main/resources/stdlibofplantuml/plantumlforkcp -r ./output/* ../plantuml/src/main/resources/stdlib
- in local fork of
plantuml/plantumlgradle cleangradle jar- produces
./build/libs/plantuml-1.2025.5beta3.jar(or a different version)
- set up PlantUML to use the produced jar (
./build/libs/plantuml-1.2025.5beta3.jar, or other version in that folder)
Note: When using the IntellIJ PlantUML plugin, changing the jar setting is not enough to properly reload it, we suggest you restart IntellIJ to make sure the plugin picks up the new jar