Skip to content

Commit 8613808

Browse files
committed
New shiny README and docs, and 2 bugfixes...
1 parent 09a837c commit 8613808

8 files changed

Lines changed: 176 additions & 144 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Simplified way to code bash made GUI frontend dialogs! Check the youtube video:
77

88
## Introduction to EBG
99

10-
.. there is [bashlib](https://github.com/cyberark/bash-lib) that is for the code
11-
itselft, well so then for the GUIs there are **EasyBashGUI** then!
10+
... There is [bashlib](https://github.com/cyberark/bash-lib) that is for the code
11+
itselft, well so for the GUIs there is **EasyBashGUI** then!
1212

1313
**E**asy **B**ash **G**ui shortened as EBG, is a Posix compliant Bash functions
1414
library that aims to give unified GUI functions using frontends for dialogs boxeds
@@ -69,13 +69,16 @@ Please check [docs/README.md](docs/README.md) document file!
6969
## Credits.
7070

7171
Thanks to Bash, Yad, Gtkdialog, Xdialog, Kdialog, Zenity, Cdialog, and Whiptail authors, this library was nothing without their work. Many thanks.
72+
Thanks to PICCORO McKAY Lenz for his efforts and *excellent* work on README (and bug hunting too).
73+
Thanks to zen0bit for first try and README impulse revival.
7274
Thanks to Frank Dietermann for suggestion though to make EBG "posix compliant" (since vers. 11.X.X )
7375
Thanks to Jose Joao Dias de Almeida for the makefile tip.
7476
Thanks to Chris "cgat" for his many ideas and suggestions that lead to version's "5.X.X" EasyBashGUI "revolution".
7577
Thanks to Davide Depau for his tests and support, and his effort to make EasyBashGUI Debian policy compliant, and finally for his man page.
7678
Thanks to Christian Prause for his patience and Git support.
7779
Thanks to Lucio Messina for "Debian policy" tips and support.
78-
Thanks to zen0bit for first try and README impulse revival.
80+
81+
7982

8083
Please, let me know if my work has been useful for you.
8184
Vittorio Cagnetta

docs/README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ write "clean_temp" at the end of all your scripts... ;-)
3535

3636
#### Backend boxes priority
3737

38-
EBG suppport for backend dialog boxeds depends on the runing programs:
38+
EBG support for backend boxed dialogs depends on the running programs:
3939

4040
1. If all the required backends are available or at least kdialog are.. the EBG
4141
will try to check if kdebin is running and only will use kdialog.
42-
2. If only GTK based are running, the EBG will just use zenity, event if xdialog
43-
is available and there is no desktop runing (window managers or similar.. )
42+
2. If only GTK based are running, the EBG will just use yad (or zenity ), even if xdialog
43+
is available and there is no desktop managers running (only window managers or similar.. )
4444

4545
#### Box mode windows
4646

@@ -61,7 +61,7 @@ message "hola"
6161

6262
All windows functions support options `<-w|-width> [integer]` and `<-h|-height> [integer]`
6363
for custom window size with exception of "notify_message" and earlier versions
64-
of kdedialog!
64+
of kdialog !
6565

6666
``` bash
6767
source easybashgui
@@ -73,9 +73,9 @@ message -w 800 -h 100 "Hello World!"
7373

7474
#### Input and output
7575

76-
EBG always use STDIN and STDOUT in conjuction with a temporally directory/filename.
76+
EBG always use STDIN and STDOUT in conjuction with a temporary directory/filename.
7777

78-
The temporally names are managed throught the variables `${dir_tmp}` and `${file_tmp}`
78+
The temporary names are managed throught the variables `${dir_tmp}` and `${file_tmp}`
7979

8080
#### Functions list features
8181

@@ -114,11 +114,11 @@ notify_change -> <-i "[new icon]"> <-t "[new tooltip]"> "[good|bad]" => (
114114

115115
## Examples
116116

117-
You must made the scripts in `bash` languaje, EBG is coded in `bash`, in this document
117+
You must made the scripts in `bash` language, EBG is coded in `bash`, in this document
118118
we will use bash to ilustrate example usages:
119119

120-
1. install EBS or sourcered the minimun 3 files
121-
2. crate the new program script from you
120+
1. install EBG or source the minimum 3 files
121+
2. crate your new program script
122122
3. source the main endpoint of EBG (check following examples)
123123
4. saves and launch the new script program
124124

@@ -197,7 +197,7 @@ dir="${choices[2]}"
197197

198198
[![](https://img.youtube.com/vi/FEn4doXmiX0/0.jpg)](https://www.youtube.com/watch?v=FEn4doXmiX0)
199199

200-
#### progress bar
200+
#### progress bar (by percent)
201201

202202
``` bash
203203
for i in 10 20 30 40 50 60 70 80 90 100
@@ -213,7 +213,21 @@ done | progress "This is a test progress..."
213213
adjust "Please, set Volume level" 15 40 75
214214
```
215215

216-
#### choose items
216+
#### choose items (only one)
217+
``` bash
218+
menu "Red" "Yellow" "Green"
219+
choice="$(0< "${dir_tmp}/${file_tmp}" )"
220+
```
221+
222+
#### choose items (one or more)
223+
``` bash
224+
list "+Red" "-Yellow" "+Green"
225+
choice_list="$(0< "${dir_tmp}/${file_tmp}" )"
226+
IFS=$'\n' ; choice_array=( $(0< "${dir_tmp}/${file_tmp}" ) ) ; IFS=$' \t\n'
227+
```
228+
229+
230+
#### progress bar (by elements)
217231

218232
``` bash
219233
women=( Angela Carla Michelle Noemi Urma Marisa Karina Anita Josephine Rachel )
@@ -223,16 +237,13 @@ today_prefered_woman="${women[${index}]}"
223237
kiss "${today_prefered_woman}"
224238
sleep 1
225239
#
226-
227240
# Job done !!
228-
229241
# then...
230-
231242
echo "PROGRESS"
232243
#
233244
done | progress "This is a _LOVE_ progress..." "${#women[@]}"
234245

235-
# if you use "PROGRESS" string in STDIN do not forget second argument ( "[elements number]" )
246+
# if you use "PROGRESS" string in STDIN do not forget *second* argument ( "[elements number]" )
236247
```
237248

238249
#### notify example with yad as backend

docs/install.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ You can use as system-wide module lib or as quick start module embebed!
2222
* Interpreter
2323
* `coreutils` 8.0+ https://www.gnu.org/software/coreutils/
2424
* `bash` 3.0+ https://tiswww.case.edu/php/chet/bash/bashtop.html
25-
25+
* `bc` 6.1+ https://www.gnu.org/software/bc/
26+
2627
## Quick start usage
2728

2829
Install `git` and then clone the repo, later echoes the required minimal example:
@@ -83,7 +84,7 @@ list +"you" -"me" +"her"
8384
clean_temp
8485
```
8586

86-
Later just lauch it! Just remmembered that this example assumes you have
87+
Later just lauch it! Just remember that this example assumes you have
8788
installed system-wide the EBG programs.
8889

8990
And... enjoy !! :-)
@@ -95,19 +96,19 @@ but due it relies on backend and coreutils programs there are some
9596
directions:
9697

9798
* **Minimalist people should depends on coreutils!** we used some command
98-
like `wc`, `type`, `cut` and `bash` and we reliles on their important features
99+
like `wc`, `type`, `cut` and `bash` and we relies on their important features
99100
that `busybox` neither `dash`/`sh` can provide it!
100-
* **backends (frontends) are not dependencies, but dialog it is!**, we are
101-
aware that we need a backend, but dialog is the backend that must be placed as
102-
a dependency, but since not only does whiptail depend on a library separate
103-
from its own but it has fewer functionalities in itself, dialog is by far
101+
* **backends (frontends) are not dependencies, but (c)dialog it is!**, we are
102+
aware that we need a backend, but "dialog" is the backend that must be placed as
103+
a dependency, but since not only does "whiptail" depend on a library separate
104+
from its own but it has fewer functionalities in itself, "dialog" is by far
104105
compatible with everything created since the beginning of times.
105-
* **dont recommends any backend (frontend), its not necesary!**, no so much
106-
package managers have the suggestion part like debian, but please dont recommends
107-
any backend, the EBG must use the already provided and present in your env!
106+
* **don't recommend any backend (frontend), it's not necessary!**, not so much
107+
package managers have the suggestion part like Debian, but please don't recommend
108+
any backend, the EBG must use the already provided one and present in your env !
108109
your project that will inplement EBG will manage those depends and recommends!
109110
* **follows installation paths** the EBG does not put any file outside of the
110111
right place, so please dont change anything!
111-
* **none of the requirements are build requirements!** yeah, EBG its fully
112+
* **none of the requirements are build requirements!** yeah, EBG it's fully
112113
runtime script!
113114

0 commit comments

Comments
 (0)