Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NCurses and HTML - is this possible?!?

31 views
Skip to first unread message

Szyk Cech

unread,
Sep 5, 2019, 4:05:48 PM9/5/19
to
Hello!

I search few minutes Internet without success.

My question is:
Is this any reasonable solution which allow to render HTML in NCurses
apps?!?
I want to write app with commandline and Qt or NCurses interface.
It will be nice if I can display some basic tags in Qt and NCurses
without conversions...

Thanks in advance. Best regards.
Szyk Cech

Ben Bacarisse

unread,
Sep 5, 2019, 4:29:35 PM9/5/19
to
Szyk Cech <szyk...@spoko.pl> writes:

> I search few minutes Internet without success.
>
> My question is:
> Is this any reasonable solution which allow to render HTML in NCurses
> apps?!?

There are console-only browsers like w3m, links and lynx so the end
result is possible. I don't know if any of these actually use NCurses,
but if any do, there may be a separable rendering library out there.

--
Ben.

dic...@invisible-island.net

unread,
Sep 5, 2019, 6:27:12 PM9/5/19
to
On Thursday, September 5, 2019 at 4:29:35 PM UTC-4, Ben Bacarisse wrote:
w3m uses termcap (a low-level interface); links (and those derived from it such as links2, elinks) are hard-coded, lynx uses curses (ncurses for instance).

For a "separable rendering library" useful with a text-browser: good luck finding that.

Rendering html is actually irrelevant to both C++ and ncurses...

Sam

unread,
Sep 6, 2019, 6:44:39 AM9/6/19
to
Szyk Cech writes:

> Hello!
>
> I search few minutes Internet without success.
>
> My question is:
> Is this any reasonable solution which allow to render HTML in NCurses apps?!?

Sure: simply write a little bit of C++ code to parse HTML, and show the
parsed text using ncurses. It's not complicated. HTML parsing is not that
hard.

> I want to write app with commandline and Qt or NCurses interface.
> It will be nice if I can display some basic tags in Qt and NCurses without
> conversions...

I don't know what "conversions" means. Parsing and formatting basic HTML is
not rocket science. Cone, a terminal mail reader, is capable of displaying
HTML-formatted E-mail, and it didn't take an eternity to write a basic HTML
parser for it; even translating some basic HTML tags into terminal color and
highlight attributes. No CSS or tables, but basic HTML content is quite
readable.

Thiago Adams

unread,
Sep 6, 2019, 8:15:59 AM9/6/19
to
If someone wants to create a project for that, let me know, I am in.

In my view HTML is the current standard of everything related with UI.
Everything else is a wast of time.

And of course we don't need all features but a subset.

I would like to use this to create interfaces for servers.
For instance a small utility to edit server config files.






0 new messages