39 lines
804 B
Markdown
39 lines
804 B
Markdown
# bog
|
|
|
|
Bash Output Generator
|
|
|
|
For readable progress report on any script with ease.
|
|
|
|
## Usage
|
|
|
|
Anotate your script with formatting helpers by using pipe construct
|
|
|
|
*Example*
|
|
|
|
```
|
|
echo "Script title" | title
|
|
echo "Author: You" | subtitle
|
|
```
|
|
|
|
Tasks are wrapped by the `section`, `output` and `result` helpers.
|
|
The flow is :
|
|
1. Print `section` header
|
|
2. Use `output` helpers to display the output you want generated
|
|
3. Close your section with `result`
|
|
|
|
```
|
|
echo "Task number One" | section
|
|
echo "This will work" | output::info
|
|
ls -l |& output
|
|
echo "This will not" | output::warning
|
|
ls /non_existent_file |& output
|
|
result
|
|
```
|
|
|
|
## Todo list
|
|
|
|
* Have result optionnaly take a custom condition of success
|
|
* Parameters on output :
|
|
* Show errors as warning
|
|
* Silent output
|