Webrun is a library of bash script, with a module architecture and an interactive user interface.
Licence : Open Software License 3.0 (OSL-3.0)
Copyright : © Steven Servanton s.servanton@gmail.com
Configuration :
Architecture path is set in the config.cfg file
Remove leading/trailing whitespace characters
These functions will be available if a flag $chk_cli is set and will render output in a custom file Fill free to add all your tips functions here ;)
Render a message with a prefix fora each different state
Arguments | Description / Example |
---|---|
string | string to echo |
state | error, warning, success |
string | log file path |
Render custom output with state color Fill free to add all your tips functions here ;)
Custom echo function, with color state
Arguments | Description / Example |
---|---|
string | string to echo |
state | error, warning, success |
separator | "separator" add a separator at the top |
Display an empty line
Display a separator line
Display a progress bar Call this function for each step throw a while or a for loop
Arguments | Description / Example |
---|---|
current step | integer |
total steps | integer |
The programm is composed of many modules locate in the folder lib.
A module structure need to meet this conditions :
MODULE_FOLDER / runner.sh
runner.sh must begin with the two following line :
#!/usr/bin/env bash # Name of your module that will be used in the modules menu
This will automatically build the README.md with all functions name with respective arguments and descriptions. Respect the following convention to have the right output :
#@title-(1,2,3...) Title #@intro # use it as main description #@intro #@name function name #@desc # function description #@desc #args argument label and description separated by : then previous argument group separated by | #@example an example of your function in use
Example :
You can easily generate documentation file as cli command
bash webrun.sh -cli documentation {LANGUAGE} {PATH} {DOC_FILE_NAME}
Example to generate this documentation file just run
bash webrun.sh -cli documentation sh . README
You can easily manage your node / npm instance Do a fresh install Clean all node component from your environement
You can easly manage your (remote) database dump / restore
Create a config file with all informations about your database instance
Arguments | Description / Example |
---|---|
username | database_username |
password | database_password |
database name | database_name |
output file name | name of dump |
path for output file | by default create in /tmp |
mysql host | by default 127.0.0.1 |
mysql port | by default 3306 |
Arguments | Description / Example |
---|---|
username | database_username |
password | database_password |
database name | database_name |
path of file to import | absolute path |
mysql host | by default 127.0.0.1 |
mysql port | by default 3306 |