# Advisory Graph Plyghd Example
This project serves as a demonstrator to show how to implement a basic language server that can interface with [klighd-vscode](https://github.com/kieler/klighd-vscode).
It demonstrates the implementation of the *DSP* (c.f. [KLighD architectural overview](https://github.com/kieler/klighd-vscode/wiki/Diagram-Server-Communication-%E2%80%90-Architectural-Overview)) in a language that cannot use the Java implementation of the KLighD server.

The concrete diagram that is generated here is a graph showing the advised relationship for various theses and student projects from the Real-Time Systems/Embedded Systems Group at Kiel University. Nodes represent people and each edge represents a work that connects an advisor with the person working on the work.

Hovering over the edges shows the full title and publishing date in a tooltip.

## Launching the Demonstrator
Set up a virtual environment and install the required packages.
```
python -m venv ls-env
source ls-env/bin/activate
pip install -r requirements.txt
```
Launch the python language server
```
python ls.py --port 5007
```
Launch the [KLighD CLI](https://github.com/kieler/klighd-vscode/releases) (or use the experimental one included in this package for full functionality).
```
../client-binary/klighd-linux --ls_port 5007 ./empty.kgt
```
This should open a diagram view in your browser.
After this, you can click on the slider button (the synthesis options panel of the KLighD CLI) and select one of the available directions.
