1
0
mirror of https://git.sr.ht/~sotirisp/qute-gemini synced 2024-11-23 08:22:18 +01:00
A userscript to view Gemini pages in qutebrowser
Go to file
Sotiris Papatheodorou b64a3f9c31 Initial implementation
2020-08-15 23:25:43 +03:00
LICENSES Initial implementation 2020-08-15 23:25:43 +03:00
qute-gemini Initial implementation 2020-08-15 23:25:43 +03:00
qute-gemini-tab Initial implementation 2020-08-15 23:25:43 +03:00
README.md Initial implementation 2020-08-15 23:25:43 +03:00

qute-gemini

A qutebrowser userscript that allows viewing Gemini pages. The pages are converted to Markdown by the script, then to HTML using Pandoc and then displayed in qutebrowser.

The script borrows code from gcat, many thanks to its authors!

Installation

  1. Install Pandoc.

  2. Copy qute-gemini and qute-gemini-tab into ~/.local/share/qutebrowser/userscripts/.

  3. Add the following lines to ~/.config/qutebrowser/config.py

    config.bind('f', 'hint links userscript qute-gemini')
    config.bind('F', 'hint links userscript qute-gemini-tab')
    

    The script only processes gemini:// URLs and opens all other URLs using qutebrowser, so it should be safe to replace the default hint keybindings.

  4. Re-source the qutebrowser config and visit the Gemini spec homepage to ensure that everything works.

Bugs and ugly stuff

  • Visit gemini:// URLs by clicking on them does not work, only opening via the keybinding is possible.

  • I couldn't find a way to pass arbitrary arguments to qutebrowser userscripts. My solution to being able to open links in the same or a different tab was to call the script using a different name.

  • Calling Pandoc for every page visited is probably not very efficient. Plus Pandoc is a quite large package.

  • Probably tons of usability issues.

  • The Gemini to Markdown conversion has several bugs. A notable example is HTML tags in the Gemini text, such as in section 5.5.1 here. No code tags are put around them when converting to Markdown, so they end up being interpreted as HTML by Pandoc/qutebrowser.

License

Copyright © 2019-2020 solderpunk, Aaron Janse, petedussin, Sotiris Papatheodorou

Distributed under the BSD 2-Clause license.