Cory Petkovsek wrote:
> 2) visually audit the thumbnails
> solution:
> I'm thinking what I would like ideally is a script that could open a
> graphic then wait for one of several keys. Left/right arrows would
> slide-show through the array of filenames. up/down arrows would
> switch between the various sizes (thumbnail/thumb2/master/original)
> of the same pic. Space would print the filename to the console (to
> be redirected to a file). Esc would quit.
I suggest you use a web browser as your user interface. If it were
me, I'd write a CGI script that builds an HTML page that includes the
images and a set of radio buttons to allow me (or other users) to
pick. Have the form's SUBMIT button reinvoke the CGI script to record
the choice(s) to a log file and move to the next image set. Write a
separate perl script that reads the log file and does what it says.
Or you could define the log file to be a shell script. In other words,
the CGI script writes to the log file entries like this:
rm -f /destdir/c2001-0516-0001.jpg
djpeg < /srcdir/P5160001.jpg | pbmscale -xysize 320 240 | \
cjpeg > /destdir/c2001-0516-0001.jpg
Then you just run the log file with /bin/sh afterwards. (-:
> Is there a module that I can use to load a graphic (the gimp won't
> work for this)?
Perl/Tk can do it. It won't be straightforward
> Once such an image is loaded, will the perl script still be
> listening on the keyboard?
Perl/Tk programs are event-based, if I remember right, so you can
define a keyboard event handler.
> If I load the image into something like xv or the gimp, then those
> programs will be monitoring the keyboard. What are there functions
> to read the special and input keys?
I don't know.
> So when I'm looking for base functionality, I should be looking
> through the man pages: man perl and derivatives; When looking for
> module functionality I should be searching cpan.org for keywords.
> Is this how you perl scribes work?
Pretty much. To search CPAN, I do:
$ perl -MCPAN -e shell
cpan> i /keyword/
...search results here...
> For debian, should I mess with the debian cpan packages that was
> mentioned recently, or should I just have `perl -MCPAN -e shell`
> install modules directly? I like the idea of debian packages
> because I know how to remove them easily, and get a listing of those
> installed.
Seth recently converted some CPAN modules into packages, I tried to
but didn't get it working. (I still don't really grok Debian, I'm
sorry to say.) If you like packages, you might as well take the time
to use them.
--
Bob Miller K<bob>
kbobsoft software consulting
http://kbobsoft.com [EMAIL PROTECTED]