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
Gemini support. #2024
Gemini support. #2024
Conversation
I think that self-signed certs are the On Nyxt side, this PR is complete and one can already browse Gemini space with style using Nyxt :) The work done there hints me at the fact that lots of internal scheme processing works done in the last months share things such as:
If we have a macro to define an internal scheme that would do all hte dirty work of catching I will get to it once we merge this PR. |
(defgeneric render (line &optional mode) | ||
(:documentation "Produce a page content string/array given LINE. | ||
(export-always 'gopher-render) | ||
(defgeneric gopher-render (line &optional mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why prefixing with "gopher"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there's also gemini-render
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we have 2 methods specializations here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no way -- gemini page body is a string (or a list of gemini objects if we parse it before rendering), while gopher rendering is line-oriented. Specializing against string doesn't feel right, so I'd better stay with two distinctly named functions.
Let me move the body of gemini-render
into process-gemini-scheme
in source/renderer/gtk.lisp. It will be a bit more coherent this way.
However, I'd leave gopher-render
as it is, as it's Gopher-specific (like search-gopher
) while everything else in small-web.lisp isn't.
How can I test? |
Run Nyxt, open |
e7e75b4
to
e62c42f
Compare
This allows us to pretty-formatted Gemini pages, see images/videos, listen to audio and interact with Gemini input pages. It's most probably 90% of what proper Gemini client should do. Things left to do: - Support redirections. - Control number of redirections (should it happen on the phos side?) - Allow self-signed certs (phos too?) - Make error pages for all the error codes there are.
This also changes error page printing to a more convenient one.
e62c42f
to
22dd017
Compare
I've inlined |
Tested, works beautifully! Feel free to merge once the CI passes. I've re-run the job, it should pass now that sbcl-phos is into Guix. |
0788dcd
to
48d9068
Compare
This allows us to browse pretty-formatted Gemini pages, see images/videos, listen to audio and interact with Gemini input pages. It's most probably 90% of what proper Gemini client should do.
What's new
gemini:
scheme.phos
for gemini requests.To do:
phos
,usocket
&c. conditions & errors.small-web-mode
(a different name?), as they share a lot of rendering and interaction code.How does it look?