webman (27th May 2010)

vaisarger Isn't your method overkill (and additional, unnecessary) dependencies if you only want console-based dialogs?
Well, webman...
First of all, my method, even if you want only "dialog mode" boxes, already has an advantage: it simplifies a lot scripter work.
An example.
This would be command line handling directly "dialog" (from its man page), about a "menu" box:
>dialog --menu <text> <height> <width> <menu height> <tag1> <item1>...
Special options:
[--create-rc "Ifile"]
Common options:
[--aspect <ratio>] [--backtitle <backtitle>] [--beep] [--beep-after]
[--begin <y> <x>] [--cancel-label <str>] [--clear] [--colors]
[--cr-wrap] [--default-item <str>] [--defaultno] [--exit-label <str>]
[--extra-button] [--extra-label <str>] [--help-button]
[--help-label <str>] [--help-status] [--ignore] [--input-fd <fd>]
[--insecure] [--item-help] [--keep-window] [--max-input <n>]
[--no-cancel] [--no-collapse] [--no-kill] [--no-label <str>]
[--no-shadow] [--ok-label <str>] [--output-fd <fd>] [--print-maxsize]
[--print-size] [--print-version] [--separate-output]
[--separate-widget <str>] [--shadow] [--single-quoted] [--size-err]
[--sleep <secs>] [--stderr] [--stdout] [--tab-correct] [--tab-len <n>]
[--timeout <secs>] [--title <title>] [--trim] [--visit-items]
[--version] [--yes-label <str>]
As you see, features are a lot, you have a great control on almost everything, but it's a little bit confusing, at least at beginning.
EasyBashGUI, instead, since its goal is simplify scripter's work, would be like so:
>export supermode="dialog" && source easybashgui
>menu <item 1> ... <item n>
...it's enough.
If you want deepest control, maybe EasyBashGUI is not for you; if you want simplicity, maybe EasyBashGUI is useful for your needs.
Moreover, you should carefully consider that your script could one day used in a graphical environment.
It's not an improbable event. You wrote a program to your geek friend, but now he's asking to you to give a nicer gui; or former intended target user is now no more comfortable with terminal programs, now being an happy KDE user; and so forth...
In that way, using my library,
>adjust "Please, set Volume" "0" "35" "100"
will work exactly the same, with dialog and, in KDE, with kdialog, without any modification.
This is, IMO, a priceless potential feature, you should consider it.
![]()
Last edited by vaisarger; 27th May 2010 at 10:33 AM.
webman (27th May 2010)
Ahhh... I forgot: Xdialog, kdialog and zenity are NOT easybashgui dependencies... it uses'hem if it find'hem in your system...
![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)