[imp] another wvHtml question
Tom Ryan
tomryan@camlaw.rutgers.edu
Fri, 19 Apr 2002 11:09:05 -0400 (EDT)
Absolutely, though I must preface all of this that its written in perl.
(though would probably take 2 minutes to rewrite in php :)
I've put imager.cgi (the imaging "program" up at
http://camlaw.rutgers.edu/~tomryan/imager.txt)
You will obviously need to change it to where your mime.types file is
stored, where your wmftopng program is stored, where your bmptoppm and
ppmtogif programs are stored, where the temp directory for horde is
located. (Sorry, none of these are configurable, I wrote very quickly and
very lazily :)
I also modifed the code to wvhtml to a better src= line.
You need to modify wvWare.c (around line 595) and change the src= to read
something like (this was on wvhtml 0.7.0)
... src=\"/path/to/where/you/put/imager.cgi?file=%s\">...
and also change lines 1197 and 1202 to also make use of the same change
above.
then, recompile and voila, you have working image support in wvhtml.
I used to have a shell wrapper around wvhtml that would use sed to replace
and fix up src as necessary, but I found that I needed my wrapper to time
out wvhtml and exit if necessary (and I could get sed to work reliably
under that).
Since I use a special version of the binary just for my webmail, it works
great. (people have even complimented on how nice it is to get attached
graphics :)
Tom
On Fri, 19 Apr 2002, Chuck Hagenbuch wrote:
> Quoting Tom Ryan <tomryan@camlaw.rutgers.edu>:
>
> > I wrote a script to parse the wvhtml conversion and rewrite it so that
> > this script was called to display the image (and delete the png file
> > after showing it).
> >
> > It works quite nicely.
>
> Want to share?
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck@horde.org>
> "A dream which helps you to live your reality with dignity
> and justice is a good dream." - Tariq Ramadan
>
--
_______________________________________________________________________
Tom Ryan Voice: 856-225-6361
Consulting System Administrator Fax: 856-969-7900
Rutgers School of Law - Camden