PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Can I display inline images in a dialog box using "dialog" or a similar CLI tool?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

Réponse
 
LinkBack Outils de la discussion
Vieux 12/11/2007, 18h51   #1
junk@billpowellisalive.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

Hi all!

I'd like to write a simple bash script that displays an image with
some text in a dialog box. The "dialog" program doesn't seem to handle
this, so I was wondering if there was an add-on to dialog, or some
framebuffer image viewer (like qiv?) I could run inside dialog, or if
I should just forget trying to do this in the shell altogether.

I know there's any number of other languages I could use to do this,
but I'd really like to do this in the shell if I can, or, failing
that, use a graphical frontend to the shell. I looked at Xdialog, but
that didn't seem to have image display capabilities either. (I'm
hoping I'm wrong; it's using the Gimp toolkit after all.)

I saw one suggestion in the archives for simply generating an HTML
file and then viewing it in a browser. This is neat, and I do know
PHP, but I'm really a glutton for doing things _fast_, and I still
haven't found a graphical browser with fast keyboard shortcuts
(although Firefox with the Vimperator extension comes close).
Also I have in mind functionality that, with the browser route, would
wind up requiring PHP and a database backend and ... well, I'd rather
do it in the shell.

If anyone has any suggestions (even something like, Go learn Python,
fool), I'd be most appreciative.

Thanks!
Bill Powell
  Réponse avec citation
Vieux 14/11/2007, 04h17   #2
bsh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

j...@billpowellisalive.com wrote:
> I'd like to write a simple bash script that displays an image with
> some text in a dialog box. The "dialog" program doesn't seem to handle
> this, so I was wondering if there was an add-on to dialog, or some
> framebuffer image viewer (like qiv?) I could run inside dialog, or if
> I should just forget trying to do this in the shell altogether.


There are so many "dialog" programs, comprising a sundry
convolution of graphic libraries (GTK, Xlib), CLI libraries
(curses, ncurses), and interfaces (XML, API).... Have you seen

http://hightek.org/dialog/

which attempts to untangle the mess. Wdialog (not currently
accessible) _sounds_ worth investigating. Although I am an
old-time curses(3) programmer, I haven't involved myself in
TUIs (Text User Interfaces) since.

> I know there's any number of other languages I could use to do this,
> but I'd really like to do this in the shell if I can, or, failing
> that, use a graphical frontend to the shell. I looked at Xdialog, but
> that didn't seem to have image display capabilities either. (I'm
> hoping I'm wrong; it's using the Gimp toolkit after all.)


One that looks promising, incorporating that fine balance
between RAD and generality, is GTK-server:

"GTK-server": GUI Builder: under Linux/Win32; requires GTK1|GTK2
http://www.gtk-server.org/
http://www.turtle.dds.nl/gtk-server/
bash(1) examples: http://www.turtle.dds.nl/gtk-server/examples.html

> I saw one suggestion in the archives for simply generating an HTML
> file and then viewing it in a browser. This is neat, and I do know
> PHP, but I'm really a glutton for doing things _fast_, and I still
> haven't found a graphical browser with fast keyboard shortcuts
> (although Firefox with the Vimperator extension comes close).


Veni, Vidi, Vici, Vimperator! Thanks for the link!

> Also I have in mind functionality that, with the browser route, would
> wind up requiring PHP and a database backend and ... well, I'd rather
> do it in the shell.


Good for you! But, by your description, this project seems
like a non-trivial production environment. I daresay that
perhaps for you the shell is not optimal for both performance
reasons and existing codebases which are available for other
languages, like perl (*:B), ruby (Ruby On Rails), or
python.

(Gedafe is quite interesting, if dated. See:
"Gedafe.pl": GEneric DAtabase Front-End -- automatic Web interface
over postgreSQL
http://isg.ee.ethz.ch/tools/gedafe/
)

> If anyone has any suggestions (even something like,
> Go learn Python, fool), I'd be most appreciative.


For two years now I have surveyed solutions for shell
GUIs for a project I am still defining. In a file, I
have 48 references for various GUI-over-shell solutions,
and I'm sure the list in not comprehensive. But some
obvious truths I hope are self-evident: (1) graphical
solutions that rely upon the luck of an appropriate
configuration are not the way to go anymore; (2) the
TUI is now obsoleted as the L.C.D. of computational
power and features is much better now; (3) and now, at
last, the WUI is now entirely practical. Just look at
what TIBCO can do!:

http://tibco.com/devnet/gi/default.jsp

So, it's never fast, Fast, FAST! to learn the New Thing,
but XForms is truly the Wave Of The Future. There's even
a plugin for FireFox:

"MozzIE": XForms plugin for FireFox
http://sf.net/projects/mozzie/
http://www.w3.org/MarkUp/Forms/2003/xforms-faq.html

.... but, for the nonce, the best and most innovative
approach that I've yet seen, applicable to your specs, is:

"Kaptain.cpp": universal graphical front-end for any script
http://sf.net/projects/kaptain/
http://sf.net/projects/kaptain/docs/kaptain.html
http://linuxgazette.net/issue64/evans.html
examples: http://userpage.fu-berlin.de/~sgmd/screenshots.html

> Thanks! Bill Powell


You're welcome. Good luck!

=Brian

  Réponse avec citation
Vieux 14/11/2007, 17h23   #3
Thomas Dickey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can I display inline images in a dialog box using "dialog" or a similar CLI tool?

bsh <brian_hiles@rocketmail.com> wrote:
> There are so many "dialog" programs, comprising a sundry
> convolution of graphic libraries (GTK, Xlib), CLI libraries
> (curses, ncurses), and interfaces (XML, API).... Have you seen


> http://hightek.org/dialog/


It's a little old (out-of-date).

This is up to date though:

http://invisible-island.net/dialog/

> which attempts to untangle the mess. Wdialog (not currently
> accessible) _sounds_ worth investigating. Although I am an


I never saw a version that wasn't basically an alpha.

> old-time curses(3) programmer, I haven't involved myself in
> TUIs (Text User Interfaces) since.


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12802 seconds with 11 queries