-- Leo's gemini proxy
-- Connecting to gemini.marmaladefoo.com:1965...
-- Sending request
-- Meta line: 20 text/gemini
Some building blocks for a Gemini client and a new Gemini console app, Romulus.
> When one Gemini client is never enough...
Gemini clients are several orders of magnitude easier to build compared to clients for that other famous public hypertext system, whose name we shall not mention here.
I created a C# Gemini client library a while ago - SmolNetSharp, which I use to do the heavy network lifting for my main GUI client GemiNaut.
There is a demonstration console application for SmolNetSharp that retrieves a Gemini page and shows the raw content - basic functionality but not very interactive.
And so having an abstracted back end library, I wondered what other user intefaces for Gemini could be built, perhaps having a quite different UI style and feel to existing ones....
The itch of curiosity inevitably struck, and so to go forth dogfooding again, I decided to have a crack at it myself, creating a console based Gemini Client using a TUI style user interface. To effectively build a quite different user interface atop the same back end.
Whatever is your preferred technology, to build a Gemini client you'll need some sort of UI toolkit, to allow the user to interact with the Gemtext content. As far as I can see, the minimum UI building blocks that you'll need will include user interaction mechanisms for:
displaying/rendering the elements of the Gemtext page - to convey the different line types (headings, paragraphs, bullets, preformatted text, links etc). The end user should be able to differentiate them and thereby understand the page structure
scrolling or paging through the content as the user reads the content - as needed going up and down through a document
link interaction and activation - to let user select and navigate a chosen link
simple text input mechanism - to support query requests, for search engines etc.
history navigation - to go back to previous pages, unwinding the current display context
These can be implemented on top of various technologies, including GUI component libraries (Gtk, Qt, Windows, HTML) or console libraries (ncurses etc).
For this client I wanted to build a console application, so rather than build the UI elements completely from scratch, I found the well-designed Terminal.Gui which is a cross platform TUI library for building interactive console apps in .NET/C#, by the veritable innovator Miguel De Icaza:
Terminal.Gui provides a rich pallete of familiar UI components, re-envisioned for the console, including menus, buttons, windows, listviews, tables, editable text panes etc. Just the ticket!
Bringing together the UI layer and Gemini client back end is most of the work of building a client. All that remains is to build the user interface and see where it goes.
Romulus (named from half of a famous pair of twins - Romulus and Remus) is the fruit of that investigation - a Gemini console application that takes a particular philosophy for its user interface - building on the Terminal.Gui framework:
Mouse support, including wheelmouse scrolling for consoles that support it
Monochrome yet beautiful gemtext rendering, by using whitespace and layout to indicate the page elements and structure.
Fixes vertical spacing between elements for a global homogenous gemtext style
Pretty text rendering, including hanging bullets, nice quotations and the like
Interactive table of contents for each page
Fast history navigation, including remembering the page offset
The main idea with this client is to see how interactive a console client for Gemini could be, whilst at the same time building a very quiet and attractive UI without colour or unecessary Gemtext glyphs (such as the line prefix markers for headings etc).
My approach was to use whitespace primarily to communicate the page structure, and a direct interaction style for links, which allows us to avoid the visual noise of numbering all the links on a page that some other console clients use.
So far it works quite nicely and I've been using it as my main driver for a while to iron out any remaining quirks and corner cases.
Right now, there is a binary build for Windows, but it should be possible to build Romulus for other platforms that support C#/.NET for folks on those platforms (Linux, Mac). I'd be interested to hear from you if manage to compile it on one of those platforms.
I'd be pleased to hear your feedback if you manage to try it out: email@example.com
______________________ ______________________ ______________________
-- Response ended
-- Page fetched on Fri Jul 23 16:16:22 2021