Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: use Web service interface of plantuml #21

Open
perrinjerome opened this issue Oct 21, 2018 · 4 comments
Open

Feature Request: use Web service interface of plantuml #21

perrinjerome opened this issue Oct 21, 2018 · 4 comments

Comments

@perrinjerome
Copy link

Instead of spawning a subprocess, it would be nice to use the "Web service mode" as described on https://plantuml.com/server . This could simplify the setup, instead of having to install java and plantuml locally, we could just use a plantuml installed in a central place.
People who don't want to bother with installing their own plantuml server can probably use https://www.plantuml.com/plantuml/

This could be a new configuration option, like plantuml_webservice_url ( default https://www.plantuml.com/plantuml/ )

About implementation detail, plantuml web service mode works by encoding the diagram source code in the URL string, like
https://www.plantuml.com/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000

It's described in https://plantuml.com/text-encoding and theres's a python implementation on pypi ( https://pypi.org/project/plantuml/ ) Implementation is a bit complex, so I guess it's better to depend on that package instead of reimplementing it, even if it looks trivial according to the doc.

PS: Even in html mode, I believe the image should be downloaded in _static dir and not included from the plantuml server as https://www.plantuml.com/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000 .

@yuja
Copy link
Collaborator

yuja commented Oct 22, 2018

Seems fine as an optional feature. Patches are welcome.

@tomghyselinck
Copy link

Hi,

This would be a great feature!

I also suppose using https://github.com/dougn/python-plantuml would be the way to go.
Dependencies are probably best optional and thus managed with 'extras_require'.

@tomghyselinck
Copy link

tomghyselinck commented May 24, 2020

@MikeSmithEU
Copy link
Member

MikeSmithEU commented Aug 19, 2020

FYI For those seeking to generate diagrams on a remote server I've just added a Gravizo Sphinx extension to sphinx-contrib that may fit your use-case (or be a temporary work-around):

https://github.com/sphinx-contrib/gravizo

It was written as a pragmatic solution to easily allow PlantUML rendering on readthedocs.io without having to pre-render locally and polluting the git repository with auto-generated files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants