-- Leo's gemini proxy

-- Connecting to gemini.marmaladefoo.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Romulus Gemini client


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.


SmolNetSharp - a cross-platform C# client library for Gemini

GemiNaut - an idiomatic Gemini GUI client for Windows


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.


Building your own Gemini client user interface


Essential UI components for a Gemini client


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).


Terminal.Gui


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:


Miguel de Icaza

Terminal.Gui - Cross Platform Terminal GUI toolkit for .NET


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!


Romulus Gemini Client


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:


Interactive menus

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

Bookmark support


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.


Screenshot of Romulus, meta-circularly viewing its own announcement

Screenshot of the Gemini home page

Screenshot showing a drop down menu of the page structure


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.


Further details and download


Romulus Gemini page

Romulus source repo


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.


Romulus binary build for Windows.


Feedback


I'd be pleased to hear your feedback if you manage to try it out: luke@marmaladefoo.com



______________________ ______________________ ______________________


Gemlog

Home


-- Response ended

-- Page fetched on Tue Apr 23 13:34:13 2024