1
0
mirror of https://git.sr.ht/~sotirisp/qute-gemini synced 2024-11-23 12:32:04 +01:00
qute-gemini/README.md

64 lines
1.9 KiB
Markdown
Raw Normal View History

2020-08-15 22:25:43 +02:00
# qute-gemini
A [qutebrowser](https://qutebrowser.org/) userscript that allows viewing
[Gemini](https://gemini.circumlunar.space/) pages. The pages are converted to
Markdown by the script, then to HTML using [Pandoc](https://pandoc.org/) and
then displayed in qutebrowser.
The script borrows code from [gcat](https://github.com/aaronjanse/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`
``` python
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](gemini://gemini.circumlunar.space) 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](gemini://gemini.circumlunar.space/docs/specification.gmi). 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.