"core" and "test" are metanames for each toolkit, a call
a call
>$./webis.py core -h
>$./webis.py core help
will print a short summary of all tools
will print a short summary of all tools
...
@@ -54,30 +54,39 @@ will print a short summary of all tools
...
@@ -54,30 +54,39 @@ will print a short summary of all tools
will perform a code style check of the tools directory
will perform a code style check of the tools directory
Adding a new Module
Adding a new Command
-------------------
-------------------
first create a new folder in the "moduls_directory" with name FOLDER
First create a new folder in the "commandss_directory" with name FOLDER add all scrips to this folder,
add all scrips to this folder, e.g. MYSCRIPT.py
e.g. MYSCRIPT.py and check if
check if
>$./webis.py FOLDER MYSCRIPT
>$./webis.py FOLDER MYSCRIPT
works
>$./webis.py FOLDER -h
>$./webis.py -h
works.
Add in config.json the general description of the command in the "commands_help" part.
### Notes for MYSCRIPT
### Notes for MYSCRIPT
inside a new module directory, every script should have a small description comment
Inside a new command directory, every script should have a small description comment, e.g.:
e.g.:
```
```
#!/bin/bash
#!/bin/bash
# NICE DESCRIPTION
# NICE DESCRIPTION
ls /
ls /
```
```
it is important for the './webis.py NAME help' call that this comment is the second line of the script, this approach can be seen as a extension of shebang
It is important for the './webis.py NAME -h' call that this comment is the second line of the script, this approach can be seen as a extension of shebang.
### General scripts
All scripts must be code style checked with the "webis code checker" command. For python scripts this checks pep8 code style and for bash it checks the google bash style conventions.
### Bash scripts
### Bash scripts
use bashhelper functions (logError, ...) for output (see install for including)
Use bashhelper functions (logError, ...) for output (see install for including).
### Python scripts
### Python scripts
use lib, log, system in "lib" directory for uniform outputs and reducing reinventing the wheel
Use lib, log, system in "lib" directory for uniform outputs and reducing reinventing the wheel.
Organize imports of each python script in the following way: