-
Notifications
You must be signed in to change notification settings - Fork 42
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
Comments
Seems fine as an optional feature. Patches are welcome. |
Hi, This would be a great feature! I also suppose using https://github.com/dougn/python-plantuml would be the way to go. |
I hav some proof-of-concept in use at https://github.com/tomghyselinck/sphinxcontrib-plantuml/tree/feature-plantuml-server |
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. |
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 .The text was updated successfully, but these errors were encountered: