[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: w3m as renderer for html, like in emacs

Olexandr Sydorchuk <olexandr.syd@xxxxxxxxx> writes:

> jidanni@xxxxxxxxxxx writes:
>> Olexandr Sydorchuk <olexandr.syd@xxxxxxxxx> writes:
>>> I'm searching for simple text html renderer to use it in my project.
>> Just use w3m -dump or lynx -dump and forget emacs?
> Yes, I know about -dump, but my goal is interactive html browser, like
> emacs-w3m, I want to write own "backend" to w3m because I see that
> emacs-w3m work fine with w3m. But exploring source code of emacs-w3m for
> understanding how its work is a little bit hard for me =). So I post here
> for a little describe of logics of emacs-w3m.

AFAIK, this is how emacs-w3m works. 

1. Retrieve header and source with "w3m -dump_extra". (w3m-w3m-dump-extra)
2. Decode the content, decide content-type, decide charset, filter the
   content, and so on. (w3m-create-page)
3. Render it using "w3m -halfdump". (w3m-rendering-buffer,
4. Fontify the content using halfdump's information. (w3m-fontify)