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

Diagram Creation Improvements #237

Closed
modelmat opened this issue Oct 7, 2019 · 7 comments
Closed

Diagram Creation Improvements #237

modelmat opened this issue Oct 7, 2019 · 7 comments

Comments

@modelmat
Copy link
Contributor

modelmat commented Oct 7, 2019

I have been working on #220 and GraphViz is a massive PITA to work with.
Attempting to find an alternative that's not horrible. The existing sphinx-compatible alternatives are:

  • PlantUML
    There is a reason why this wasn't used by @Daltz333 couldn't remember
  • BlockDiag
    Requires too many dependencies
  • GraphViz
    A PITA to work with

Some non-sphinx-compatible alternatives (non have sphinx extensions):

  • Pic/Groff
    Is quite complex like GraphViz although it seems a less of a PITA
  • draw.io
    This would allow for a GUI way of creating diagrams. It is also open-source and has a CLI tool that can convert from the diagrams into an image file. Unfortunately, the diagram files are XML with base64 encoded strings, but I believe the tradeoffs are worth it (easy GUI).

If anyone has any other suggestions for including diagrams in sphinx (preferably without having to create a sphinx extension, this would be nice.

@Daltz333
Copy link
Member

Daltz333 commented Oct 7, 2019

I like the draw.io approach personally, the tradeoff is definitely worth it in terms of ease of development, and text-based alternatives are completely useless for visualizers anyways 🤷‍♂

@modelmat
Copy link
Contributor Author

modelmat commented Oct 7, 2019

I made a quick sphinx extension for draw.io here.
It doesn't work on Linux atm (only on Windows) and may not work inside the CI (see jgraph/drawio-desktop#127).

@modelmat
Copy link
Contributor Author

We could also use the Sphinx tikz extension.

@modelmat
Copy link
Contributor Author

modelmat commented Nov 3, 2019

It appears that drawio should now work inside a docker container. It would most likely work inside of Azure too.
There is also draw-image-export2.

I still won't be able to confirm/work on this for a little while, hwoever.

@modelmat
Copy link
Contributor Author

I have now have https://github.com/Modelmat/sphinxcontrib-drawio working in CI and it should be ready for use. There is also a unit test :)

@rickyjames35
Copy link

It appears that drawio should now work inside a docker container. It would most likely work inside of Azure too.
There is also draw-image-export2.

I still won't be able to confirm/work on this for a little while, hwoever.

@modelmat what was the solution to running drawio inside a docker container? I see there is a draw-image-export2 but I don't see a way to run it inside a docker container.

@ItayZiv
Copy link
Contributor

ItayZiv commented Jun 27, 2020

It appears that drawio should now work inside a docker container. It would most likely work inside of Azure too.
There is also draw-image-export2.
I still won't be able to confirm/work on this for a little while, hwoever.

@modelmat what was the solution to running drawio inside a docker container? I see there is a draw-image-export2 but I don't see a way to run it inside a docker container.

We ended up running an Xvfb server to run draw.io CLI, there's a working version of this at https://github.com/Modelmat/sphinxcontrib-drawio for source code, but we don't use it since we cannot install draw.io on RTD, without very big complexity, so right now what we do is have svg files with embedded diagram metadata

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

Successfully merging a pull request may close this issue.

4 participants