Perl module offering a Command-Line User Interface

Edit Package perl-Term-Clui
http://search.cpan.org/dist/Term-Clui/

Term::Clui offers a high-level user interface to give the user of
command-line applications a consistent "look and feel". Its metaphor for
the computer is as a human-like conversation-partner, and as each
question/response is completed it is summarised onto one line, and remains
on screen, so that the history of the session gradually accumulates on the
screen and is available for review, or for cut/paste. This user interface
can therefore be intermixed with standard applications which write to
STDOUT or STDERR, such as _make_, _pgp_, _rcs_ etc.

For the user, _choose()_ uses either (since 1.50) the mouse; or arrow keys
(or hjkl) and Return; also *q* to quit, and SpaceBar or Button3 to
highlight multiple choices. _confirm()_ expects y, Y, n or N. In general,
ctrl-L redraws the (currently active bit of the) screen. _edit()_ and
_view()_ use the default EDITOR and PAGER if possible.

It's fast, simple, and has few external dependencies. It doesn't use
_curses_ (which is a whole-of-screen interface); it uses a small subset of
vt100 sequences (up down left right normal and reverse) which are very
portable, and also (since 1.50) the _SET_ANY_EVENT_MOUSE_ and _kmous_
(terminfo) sequences, which are supported by all _xterm_, _rxvt_,
_konsole_, _screen_, _linux_, _gnome_ and _putty_ terminals.

There is an associated file selector, Term::Clui::FileSelect

Since version 1.60, a speaking interface is provided for the
visually-impaired user; it employs _eflite_ or _espeak_. Speech is turned
on if the _CLUI_SPEAK_ environment variable is set to any non-empty string.
Since version 1.62, if _speakup_ is running, it is silenced while
Term::Clui runs, and then restored. Because Term::Clui's metaphor for the
computer is a human-like conversation-partner, this works very naturally.
The application needs no modification.

There is an equivalent Python3 module, with (as far as possible) the same
calling interface, at
http://cpansearch.perl.org/src/PJB/Term-Clui-1.70/py/TermClui.py

This is Term::Clui.pm version 1.70

Refresh
Refresh
Source Files (show unmerged sources)
Filename Size Changed
Term-Clui-1.76.tar.gz 0000079748 77.9 KB
cpanspec.yml 0000000669 669 Bytes
perl-Term-Clui.changes 0000001609 1.57 KB
perl-Term-Clui.spec 0000003824 3.73 KB
Latest Revision
Darin Perusich's avatar Darin Perusich (deadpoint) committed (revision 1)
Comments 0
openSUSE Build Service is sponsored by