Minimal but usable interactive Gemini client in almost < 100 LOC of Go
Go to file
Solderpunk 1d6bcf551c Handle preformatted content. 2020-03-07 20:35:18 +01:00
.gitignore Initial commit 2019-10-29 13:23:22 -04:00
LICENSE Initial implementation. 2019-10-29 19:45:36 +02:00
README.md Initial implementation. 2019-10-29 19:45:36 +02:00
gemini-demo.go Handle preformatted content. 2020-03-07 20:35:18 +01:00

README.md

gemini-demo-3

Minimal but usable interactive Gemini client in not quite < 100 LOC of Go.

Rationale

One of the original design criteria for the Gemini protocol was that "a basic but usable (not ultra-spartan) client should fit comfortably within 50 or so lines of code in a modern high-level language. Certainly not more than 100". This client was written to gauge how close to (or far from!) that goal the initial rough specification is.

Capabilities

This crude but functional client:

  • Has a minimal interactive interface for "Gemini maps"
  • Will print plain text in UTF-8
  • Will NOT prompt for user input
  • Will NOT follow redirects
  • Will report errors
  • Does NOT DO ANY validation of TLS certificates

Non-text files are not yet handled.

This is less functional than the Python demo (gemini-demo-1) or Lua demo (gemini-demo-2). Further, it's the only one of these demo clients which is not currently below 100 lines. This may be as much due to my inexperience with Go as with the language's unavoidable verbosity. Improvements welcome.

Usage

Run the client and you'll get a prompt. Type a Gemini URL (the scheme is implied, so simply entering e.g. gemini.conman.org will work) to visit a Gemini location.

If a Gemini menu is visited, you'll see numeric indices for links, ala VF-1 or AV-98. Type a number to visit that link.

There is very crude history: you can type b to go "back".

Type q to quit.