4 releases

0.4.4 Jun 11, 2024
0.4.3 Jun 11, 2024
0.4.1 Jun 10, 2024
0.4.0 Nov 24, 2022

#89 in Visualization

Download history 10/week @ 2024-08-20 1/week @ 2024-08-27 13/week @ 2024-09-03 5/week @ 2024-09-10 7/week @ 2024-09-17 75/week @ 2024-09-24 21/week @ 2024-10-01

151 downloads per month

Apache-2.0 OR MIT AND Zlib

19KB
228 lines

planturl

A plantuml file to server-url-encoder. For use with Gitea or any documentation tool. Encodes plantuml-code-snippets as URL usable for the PlantUML-Service or a self-hosted clone as described in PlantUML Text Encoding. Can return a link, a html-img-snippet or a downloaded image-file for a given PlantUML-snippet.

Install

check out this project.

cargo install --features=build-binary --path=<path to this project>

Usage

A plantuml-file to server-url-encoder and downloader.


Usage: planturl [OPTIONS]

Options:
  -s, --source <SOURCE>            Input file, stdin if not present
  -u, --base-url <BASE_URL>        appends the encoded-string onto this URL [default: http://www.plantuml.com/plantuml]
  -i, --img                        embeds the url into an HTML-IMG-Tag
  -d, --download                   downloads an image from a plantuml-server
  -c, --compression <COMPRESSION>  compression to use [hex, deflate, best] [default: deflate]
  -t, --type <IMAGE_TYPE>          imagetype [ascii, png, svg] [default: svg]
  -f, --file <FILE>                saves the result in the given file or stdout if not present
  -h, --help                       Print help information
  -V, --version                    Print version information

Gitea integration

add a plantuml-markup-section in the app.ini-file:

[markup.plantuml]
ENABLED = true
# List of file extensions that should be rendered by an external command
FILE_EXTENSIONS = .puml,.uml,.plantuml
# External command to render all matching extensions
RENDER_COMMAND = "/path/to/planturl --base-url https://www.plantuml.com/plantuml --img"
# Don't pass the file on STDIN, pass the filename as argument instead.
IS_INPUT_FILE = false

Dependencies

~0–11MB
~147K SLoC