Rene Kita's weblog
Blog[0] About[1] RSS[2] Links[3]
Gemini support for w3m
2023-01-23
_tl;dr_ I wrote a patch to add Gemini support to w3m. Checkout branch 'gemini' from my git repo[4]
I started adding Gemini[5] support to w3m[6]. 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) (lynx: '\' SOURCE) 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://git.sr.ht/~rkta/w3m
- Change into the new directory: cd w3m
- Checkout branch gemini: git checkout gemini
- Get the build dependencies: apt-get build-dep w3m (or the equivalent of your distro)
- Configure and build: ./configure && make
- Try: ./w3m gemini://rkta.srht.site/w3m-gemini.gmi
I've you need help or just want to leave feedback send me an email or join #w3m[7] on irc.libera.chat[8]
Changelog
2024-09-07:
This is now maintained in a separate git branch
2024-05-16:
Really make sure the correct buffer type is set
Thanks to IRC user cizra for debugging and reporting!
2023-10-28:
Make sure the correct buffer type is set
2023-08-13:
Fix a bug that added empty entries to known_hosts
Simplify the code a bit
Let geminize command show up in help menu
2023-03-26:
Update the patch to indent blockquotes with four spaces
- 0: Another not supported protocol is finger, let's see what happens when gemini support is finished
Last modified: 2024-09-07T17:10:11Z
E-mail: mail@rkta.de[9] IRC: #rkta[10] on Libera.Chat[11]
Copyright (c) 2017-2024 Rene Kita
[0] Blog
[1] About
[2] RSS
[3] Links
[4] git repo
[5] Gemini
[6] w3m
[7] #w3m
[8] irc.libera.chat
[9] mail@rkta.de
[10] #rkta
[11] Libera.Chat