tl;dr I wrote a patch to add Gemini support to w3m.
I started adding Gemini
support to w3m. As a user w3m
is a great piece of software. It has good HTML support and speaks nearly all
other protocols you'll come across while surfing the web#0. It
bothered me that I had to use a different tool when I came across a
gemini link. Also, you don't often get the chance to add a new
protocol to a 28 year old piece of software.
This is still Work in Progress, but has enough features to be usable.
Features
'Clickable' links
Folds lines at word boundary
Pressing 'v' (VIEW) on a text/gemini buffer toggles between rendered and text/plain view
Follows redirects
Permanently accept self-signed certificates (Trust On First Use)
Partial support for INPUT (still quoting issues)
Use command GEMINIZE (via Esc-c) to render text/plain as text/gemini
To-do
Fix quoting of special chars in URL for INPUT
Do not overwrite known_hosts/accepted self-signed certificates if they were modified by another instance of w3m
Clean up code (Current stage: "Make it work"; next stage: "Make it good")
Add a configure switch to enable/disable Gemini support for the compile stage
Make handling of 'Advanced line types' (Headings, lists and quotes) configurable through options
How to
Get the w3m sources: git clone https://github.com/tats/w3m
Change into the new directory: cd w3m
Download the patch: wget https://rkta.de/assets/gemini.patch
Apply the patch: patch < gemini.patch
Get the build dependencies: apt-get build-dep w3m (or the equivalent of your distro)
Configure and build: ./configure && make
Try: ./w3m gemini://gemini.circumlunar.space/
I've you need help or just want to leave feedback send me an email or join #w3m on irc.libera.chat
0: Another not supported protocol is finger, let's see what happens when gemini support is finished