bitplan / diagrams Goto Github PK
View Code? Open in Web Editor NEWOnline diagrams-Service supporting graphviz, mscgen and plantuml markup
Home Page: http://diagrams2.bitplan.com
License: Apache License 2.0
Online diagrams-Service supporting graphviz, mscgen and plantuml markup
Home Page: http://diagrams2.bitplan.com
License: Apache License 2.0
Using TIKZ is the common way to draw pictures/diagrams with latex.
An output option would be very helpful.
Below is an example of an UML-Class diagram using the tikz-uml package, see overleaf example as well.
\begin{tikzpicture}
\begin{umlpackage}{EquipmentProfile}
\umlclass[]{Terminal}{conductedTo : ACLineSegment\\limit: Limit}{}
\umlclass[x=-5, y=-3]{Limit}{value : double}{}
\umlclass[x=+5, y=-3]{ACLineSegment}{}{}
\umlclass[y=-5]{IdentifiedObject}{name : string\\mrid : IRI}{}
\umlinherit[geometry=|-]{ACLineSegment}{IdentifiedObject}
\umlinherit[geometry=|-]{Limit}{IdentifiedObject}
\umlinherit[geometry=-|]{Terminal}{IdentifiedObject}
\umlunicompo[mult=0..2, pos2=0.5]{Terminal}{ACLineSegment}
\umlunicompo[mult=1]{Terminal}{Limit}
\end{umlpackage}
\end{tikzpicture}
plantuml diagrams should be automatically wrapped as did the original plantuml extension
png is currently hard coded
if there is an error in generating a diagram it should be propagated to the wiki client with a proper json message.
Trying to run
python3 dgs/webserver.py
or
./run
in directory diagrams caused an error:
"File "dgs/webserver.py", line 9, in from dgs.diagrams import Generators, Generator, Example
ModuleNotFoundError: No module named 'dgs'"<
Could be solved by chagngin line 9 in webserver.py from
from dgs.diagrams import Generators, Generator, Example
to
from diagrams import Generators, Generator, Example
the selected generator and output should stay
I'm trying upgrading our Mediawiki installation from an old version to 1.35 LTS. GraphViz isn't maintained anymore, so I'm now using the plugin Diagrams. The Python application is running and I can draw diagrams directly from the build-in webgui. Only drawing a diagram from our Mediawiki installation doesn't work. Diagrams show the following error when I try to draw a diagram from Mediawiki:
[2022-02-08 13:28:14,315] ERROR in app: Exception on /render [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "dgs/webserver.py", line 68, in renderForWikiExtension
result=gen.generate('dot',source,targetFormat)
AttributeError: 'NoneType' object has no attribute 'generate'
The diagram I tried to draw:
<graphviz>
digraph G {
rankdir = TD;
edge [arrowhead=none];
node [shape=box, color=lightblue2, style=filled];
"dummy1"; "dummy2"; "dummy3";
"dummy1" -> "dummy3" [label="100Mbps" fontsize="10"];
"dummy1" -> "dummy3" [label="100Mbps" fontsize="10"];
"dummy2" -> "dummy3" [label="100Mbps" fontsize="10"];
"dummy2" -> "dummy3" [label="100Mbps" fontsize="10"];
}
</graphviz>
LocalSettings.php:
wfLoadExtension('Diagrams');
$wgDiagramsServiceUrl = 'http://127.0.0.1:5003';
As a mediawiki user when using the extension:
https://www.mediawiki.org/wiki/Extension:Diagrams
this webservice should be capable of being used as
an endpoint for $wgDiagramsServiceUrl
the webservice debug, port and host should be specifiable via the command line
python3 dgs/webserver.py -h
usage: webserver.py [-h] [--debug] [--port PORT] [--host HOST]
Diagrams rendering webservice
optional arguments:
-h, --help show this help message and exit
--debug run in debug mode
--port PORT the port to use
--host HOST the host to serve for
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.