Commit a11e6f6a authored by Adrian Wuillemet's avatar Adrian Wuillemet
Browse files
parents 04d9ee86 247c2282
Pipeline #4331 passed with stage
in 40 seconds
......@@ -47,14 +47,18 @@ can be found below!<br>
<a name="deps"></a>
**Beads<sup>®</sup>** is a commandline tool built with Python for the backend and
web technologies for the GUI. To run beads you need to have:<br>
web technologies for the GUI. To run beads you need to have<br>
<br>
**Python 3.x.x** <br>
**A web browser of your choice**
* **Python 3.x.x**
* **a web browser of your choice**
<br>
installed on your system. And thats it.<br>
installed on your system. And thats it. If you do not have python installed you
can get it from [here](https://www.python.org/downloads/).<br>
The tool is usable without any web browser, however only from the commandline.
<br>
As listed in the section [Used technologies](#techs), **Beads<sup>®</sup>** is
......@@ -64,7 +68,7 @@ GUI to install chrome/chromium, neither do we want to package a distribution of
that do not care about the GUI.<br>
<br>
Chrome or Chromium is only a soft dependency, with which **Beads<sup>®</sup>** - GUI
works best. Alternatively any other web browser will suffice and the system standard
works best. Alternatively any other modern web browser will suffice and the system standard
browser will be used, if no chrome is detected.
<br>
<br>
......@@ -77,6 +81,124 @@ We deploy the tool and all updates via the [Python Package Index](https://pypi.o
hands on the tool simply install it with _pip_ and you are good to go.
```shell
pip install beads
$ pip install beads
```
Any internal dependencies will be handled by pip!<br>
The second method is to clone the project with [Git](https://git-scm.com) and set it up
by yourself. We do not support this method and therefore provide no guide on how to.
Any usage described in the sections below may differ if you install the tool this way.
<br>
<br>
### 3. Commandline usage
<a name="cmd"></a>
**Beads<sup>®</sup>** follows standard conventions on commandline usage. A list of
available commands and options, as well as documentation for them can be found below.<br>
Alternatively running
```shell
$ beads --help
#or
$ beads [command] --help
```
from the commandline will print the help section of the tool that contains all needed
information as well. We advise users to default to the cmd **--help** option for all commands
and options rather than consulting this section, as that is always up to date.
**List of commands and options**<br>
_(including examples of usage)_<br>
Printing information on the terminal:
```shell
$ beads [command] [option] --help
```
Printing the current version:
```shell
$ beads --version
```
Print an overview of all supported programming languages:
```shell
$ beads languages
# it is possible to filter the languages by appending a search string like 'ava'
# which will only display supported languages that contain the string like 'java' or 'javascript'
$ beads languages ava
```
The main purpose of the tool is to parse a textual representation of a state machine
into working code.<br>
To to so you use the command 'parse':
```shell
$ beads parse FILES [options]
# Options
$ beads parse FILES
-l / --language # Specify the programming language of the generated code. Default: none
-o / --out # Specify the output file. Default: ./FILENAME.language
-re / --replace-existing # FLAG to replace existing files with the generated code
-nv / --no-validation # FLAG to skip the internal validation of the state machine logic
-bd / --base-directory # Set a base directory, that all files will be saved in. Default: .
-v / --verbose # FLAG to execute the programm in verbose mode printing all debug information
# Examples
$ beads parse /E/documents/controller.bead
# assuming you have a state machine in a .bead file here: /E/documents/controller.bead
# the command will parse the file and save the generated code in the current working directoy.
$ beads parse /E/documents/controller.beads ../machines/statemachine.json
# it is possible to provide multiple files at once
$ beads parse machine.json --language python --no-validation
# will skip the validation of state machine logic and try to produce code in python
$ beads parse machine.json --out ../package/machine.py --replace-existing
# will save generated code in ../package/machine.py and replace an already existing file if there is one
$ beads parse machine1.bead machine2.bead machine3.bead --base-directory ./machines/code
# will parse all three provided machines and save them in the specified directory ./machines/code
$ beads parse machine1.bead controller2.json -l java -v -re -bd ../code/generated/
# Complex example executing verbose, replacing any existing file
# and placing the generated code from both files which will be java code into ../code/generated
```
Open the GUI:
```shell
$ beads gui
```
<br>
<br>
### 6. Used technologies
<a name='techs'></a>
We are building an open source lightweight tool for commandline usage with the following techs:
**CLI**
___
![Python](https://img.stackshare.io/service/993/pUBY5pVj.png)
![Click](../documentation/media/click.png)
![Eel](../documentation/media/eel.png)
<br>
<br>
**GUI**
___
![HTML5](https://img.stackshare.io/service/2538/kEpgHiC9.png)
![Sass](https://img.stackshare.io/service/1171/jCR2zNJV.png)
![Typescript](https://img.stackshare.io/service/1612/bynNY5dJ.jpg)
![D3.js](https://img.stackshare.io/service/1491/d3-logo.png)
![Prism.js](https://avatars0.githubusercontent.com/u/11140484?s=400&v=4)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment