top | item 26116372

(no title)

n0ot | 5 years ago

I just wrote a plugin to make Edbrowse work with gemini. It supports TOFU, prompts, client certificates, handles redirects, and passes most of the gemini torture tests, that don't involve crazy unicode wrapping. Edbrowse's plugin support is extremely basic, so telling it about other media types, and auto redirecting away from gemini isn't possible without modifications to Edbrowse, as far as I know. I plan to add a few more features, like the ability to view the server certificate, and move up a directory, but I've only put about six or so hours into this thing so far, having never even used a gemini client beforehand.

Here's the plugin portion that goes into your Edbrowse configuration (~/.ebrc; you'll need to update the paths for your local system). If you want to use a client certificate, add -c your-cafile.crt -C your-cakey.crt to the program = ... line, before %i.

    plugin {
        type = */*
        desc = Gemini
        protocol = gemini
        program = /Users/ncarpenter/.config/edbrowse/plugins/ebgmni.py %i
        outtype = h
    }
And here's the helper Python script. It's a simple gemini client that converts text/gemini responses to HTML, for display in Edbrowse. You'll need to pip install ignition-gemini. The above plugin's program = line should point to it.

https://gist.github.com/n0ot/b257e44a414732ef97ca08c00b5a7a9...

discuss

order

No comments yet.