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>
**Python 3.x.x** <br>
**A web browser of your choice**
* **Python 3.x.x**
* **a web browser of your choice**
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](<br>
The tool is usable without any web browser, however only from the commandline.
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>
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.
......@@ -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.
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]( 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.
### 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
$ beads --help
$ 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:
$ beads [command] [option] --help
Printing the current version:
$ beads --version
Print an overview of all supported programming languages:
$ 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':
$ 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/ --replace-existing
# will save generated code in ../package/ 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:
$ beads gui
### 6. Used technologies
<a name='techs'></a>
We are building an open source lightweight tool for commandline usage with the following techs:
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