[elinks-users] browse MS Word files

Jonas Fonseca fonseca at diku.dk
Fri May 6 16:49:44 PDT 2005


Alexey Tourbin <at at altlinux.ru> wrote Thu, May 05, 2005:
> Hello,
> 
> I've got wvHtml, an utility which converts MS Word files to HTML (see
> http://wvware.sourceforge.net/ for details).  Is there a way to take
> advantage of this and browse *.doc files smoothly?  I.e. I want wvHtml
> to be invoked somewhere in the middle before HTML rendering takes place.
> 
> I saw how HTML chunks are generated in e.g. protocol/gopher/gopher.c,
> but this mechanism seems to be at least protocol-specific.

Yes, both local file, FTP, SMB and gopher generates HTML for showing
directories.

> Using MIME/mailcap seems to be inappropriate here, since AFAIK there's
> no way to give HTML code back to ELinks window.  Using less(1) is
> required for some reason.

Yes, the copious flag in mailcap is handled using an external pager like
less. However, it would be great to fix bug 121 and finally allow the
output from MIME handlers to be displayed directly in ELinks. If you
have ideas for solving it please contribute to

http://bugzilla.elinks.or.cz/show_bug.cgi?id=121

One problem with the mailcap way, I suppose, is that you cannot specify
the MIME-type of what comes out for copiousoutput. We could of course
introduce our own special flag for handling this?

> The last possibility is scripting (similar to source code highlight in
> contrib/lua/hooks.lua.in), but it can't handle MIME-type information,
> and the decision is based solely on filename suffix.

We could pass MIME type information to the scripting hooks.

> So... isn't there a better way?

It sounds like the scripting is the best way currently. Some internal
(and scriptingless) way of making hooks for preformatting should also be
considered, IMO.

-- 
Jonas Fonseca



More information about the elinks-users mailing list