https://github.com/dullage/workfl
A simple flow-diagram markup language.
https://github.com/dullage/workfl
diagram markup-language workflow
Last synced: 2 months ago
JSON representation
A simple flow-diagram markup language.
- Host: GitHub
- URL: https://github.com/dullage/workfl
- Owner: dullage
- License: mit
- Created: 2019-06-08T09:47:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-15T15:25:35.000Z (over 6 years ago)
- Last Synced: 2025-07-30T15:21:05.159Z (5 months ago)
- Topics: diagram, markup-language, workflow
- Language: Python
- Size: 19.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# workfl
***Workf**low Markup **L**anguage*
## Introduction
workfl is a lightweight markup language for simple workflow diagrams. It's designed to be quick to write and easy to read.
Example:
```workfl
A
B
D
A
C
D
```

You can try it out for yourself at [workfl.ws](https://workfl.ws).
The workfl python package can convert workfl markup into dictionaries of nodes and connections. There is also a method to export the workflow into [mermaid](https://mermaidjs.github.io/) syntax.
## Installation
`pip install workfl`
## Usage
```python
import workfl
markup = "A\nB"
flow = workfl.ws(markup)
print(flow.nodes) # A dictionary of nodes
print(flow.connections) # A dictionary of connections
mermaid = flow.to_mermaid()
print(mermaid)
```
By default `to_mermaid()` will render a chart flowing from Top to Bottom. This can be changed by declaring a `direction` e.g. `to_mermaid(direction="LR")` (Left to Right). There are 4 options:
| Option | Direction |
| -- | -- |
| TB | Top to Bottom (Default) |
| BT | Bottom to Top |
| LR | Left to Right |
| RL | Right to Left |
## Syntax
A full guide can be found here .
## To Do
* Test scripts.