-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rendering web content in TUI apps - aka WebView support #2938
Comments
This is certainly an ambitious feature. Implementing from scratch is not really feasible, so there would need to be a library which did all the heavy lifting (web page -> ascii, scroll, request link etc). So probably a library wrapping chromium or something. Any library/binary that is directly writing to screen e.g. with curses is going to be harder to wrap. This would make more sense as a seperate library:
The other way to deal with this would be to have your main app exit from the Terminal.Gui main loop and run a web browser (e.g. lynx) full screen in the terminal. Then on exit re-launch the terminal gui. But that would not allow you to embed |
If you want to have an idea on how to do this here is a Blazor API done for the |
@BDisp the OP is not asking for Terminal.Gui apps in a browser. He/she is asking for a web browser within a Terminal.Gui app. |
Ops my bad, sorry for the misunderstand. |
I have experience with .NET Html engines as part of https://github.com/tig/winprint. I use 99% of the cases users of WinPrint choose fixed-pitch fonts, and thus it would not be THAT hard to use LiteHtml to be able to render to a Terminal.Gui |
@tig just curious were those strings supposed to look like this or someone forgot to update them? The rendered pages don't have to look fancy, just get a general idea of what a page looks like and to be able to read text. Maybe the engine that https://github.com/fathyb/carbonyl uses could be an option? It seems very light-weight. |
Sorry, don't remember.
Wow. That's cool. It's not clear to me if this is a PORT of Chromium or somehow uses Chromium?? |
According to this carbonyl uses a modified version of the chromium headless shell |
Thinking about this more, I'm skeptical a Chromium-based solution will work well for many Terminal.Gui scenarios:
I'm back to the idea that |
I wonder how feasible it would be to have a view that wrapped another console process (kind of like tmux). This would allow running I know there has been work in the past on TerminalView e.g. https://github.com/migueldeicaza/XtermSharp/blob/master/GuiCsHost/TerminalView.cs which might allow something like this (see #1244 (comment)). |
Is your feature request related to a problem? Please describe.
View websites or render HTML strings inside a terminal. There are lots of potential uses for this feature. I'm not sure if it's even possible with the current state of dotnet without writing a whole new HTML rendering engine.
Describe the solution you'd like
Either incorporate one of the existing WebView controls, e.g. https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebView/ or create a new one based on some existing engine.
Additional context
Existing CLI based web browers:
https://github.com/fathyb/carbonyl
http://lynx.browser.org/
https://github.com/tats/w3m/tree/master/doc
The text was updated successfully, but these errors were encountered: