Difference between revisions of "Diagrams"

From BITPlan Wiki
Jump to navigation Jump to search
Line 81: Line 81:
 
</source>
 
</source>
 
= Running =
 
= Running =
 +
== Usage ==
 +
<source lang='bash'>
 +
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
 +
</source>
 +
== starting webservice ==
 
<source lang='bash'>
 
<source lang='bash'>
 
export PYTHONPATH="."
 
export PYTHONPATH="."

Revision as of 06:43, 15 February 2020

OsProject
id  diagrams
state  
owner  BITPlan
title  Diagrams rendering service for graphviz, mscgen and plantuml
url  https://github.com/BITPlan/diagrams
version  0.0.1
description  
date  2020-02-14
since  
until  

Click here to comment see Diagrams

What is it ?

This is a Python based webservice to render diagrams for

Demo

https://diagrams.bitplan.com

Examples

tool source image
dot
graph development { 
  Stakeholder -- Requirements; 
  Requirements -- Samplecases;
  Requirements -- Model;
  Model -- Code;
}
neato
graph G {
  run -- intr;
  intr -- runbl;
  runbl -- run;
  run -- kernel;
  kernel -- zombie;
  kernel -- sleep;
  kernel -- runmem;
  sleep -- swap;
  swap -- runswap;
  runswap -- new;
  runswap -- runmem;n
  new -- runmem;
  sleep -- runmem;
}

Installation

If you'd like to run your own service you need a python 3 environment includin pip3. The software has been tested on Ubuntu 18.04 and Mac OS 13.6 using macports.

git clone https://github.com/BITPlan/diagrams
cd diagrams
./install

Running

Usage

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

starting webservice

export PYTHONPATH="."
python3 dgs/webserver.py

Json API

Diagrams

Example

{ 
       "diagrams": {
          "png": {
             "url": "http://diagrams.bitplan.com/render/png/0xb00d69ad"
          }
       }
    }

0xb00d69ad.png

Errors

Example

{ 
  "error": "service not ready",
  "message": "not implemented yet"
}

Links