[tapir-development] Re: Return image instead of text from a script

  • From: Sveinbjörn Þórðarson <sveinbt@xxxxx>
  • To: tapir-development@xxxxxxxxxxxxx
  • Date: Wed, 10 Aug 2005 08:20:40 -0000 (GMT)

> On 2005-05-10, Sveinbjorn Thordarson <sveinbt@xxxxx> wrote:
>> I'm working on this for version 1.1 of Tapir.  But I would implement
>> it so that if a line of output matched something like:
>> TAPIR%%IMAGE=/path/to/image.gif%%, it would set the icon image to the
>> icon at that path.
>
> O.K. Thanx. I'll write to a file into /tmp/ then. May you envisage an
> option for Tapir to delete the image once loaded? Something like
> TAPIR%%IMAGE%DEL=/path/to/image.gif%% for example? It would prevent
> file cluttering.

It would of course always be possible to delete the image from a previous
execution by using a script. e.g. something like this.   Let's call this
script image.sh

#!/bin/sh

# Delete any previous image
rm /tmp/tmpImg.gif

# Create a new image at /tmp/tmpImg.gif
... ... ..

# Set it to be displayed
echo "TAPIR%%IMAGE=/tmp/tmpImg.gif%%"

Then you would just set this script to be executed by Tapir, by bundling
the script, and making Tapir's command './image.sh'.

Cheers,

Sveinbjorn Thordarson


Other related posts: