gophed: my own gopher client
==================================

I don't know whether it is indeed a "coming-of-age" ritual [1] or if
it's just that Gopher is so simple that nobody can resist it: I got my
own gopher client working, and it's called `gophed`.

`gophed` is not a fancy gopher client. It does not have any fancy
function. It does not have a fancy interface. It is just a barebone tool
to visit gopher pages. If you are curious, you can have a look at the
code at:

 gopher://cgit.mine.nu/1/cgit-70.cgi?url=gophed/

or clone the repo from:

 http://cgit.mine.nu/gophed/

`gophed` is just a POSIX shell script that stitches together a few
standard unix tools to get the job done. And you need very little
indeed, to get a functioning gopher client:

 1) a way of connecting to a gopher server via TCP, and get a file
 2) a way of rendering a text file (a gophermap is no more than that)
 3) a way of "navigating" gopher menus

Point 1) is addressed in `gophed` by using `netcat(1)` (also known as
`nc(1)), a de-facto standard Unix tool that connects its standard input
and standard output to a TCP/UDP socket, effectively allowing to easily
send/receive data to/from a remote host. netcat(1) is rightfully
considered the `network swiss-army knife`, since it can be used in many
different ways (I will probably cover some of them here, in the future)
[2].

For point 2) `gophed` uses `ed(1)`. Yes, ed(1), the standard Unix
editor, the editor available in any Unix-like system which is worth to
be called Unix.  Despite many people have had a quite traumatic
experience with ed(1), well it's a beautiful and simple piece of
software, which happens to be perfect as a pager as well.

For point 3) `gophed` uses the "!" command available in ed(1), and a few
symbolic links to `gophed` itself, which allow to "visit" a given gopher
URL ('v'), to "go" to one of the selectors of a gopher map ('g'), or to
"download" a file to your disk ('d').

The accompanying README file gives more info about `gophed`. If you know
your way around ed(1), you should be totally fine. If you don't, just
stick to the README. If you have comments, suggestions, patches, etc.,
you know how to contact me.

I am grateful to solene [3] for the original idea about an ed-based
gopher client :)

-+-+-+

ed(1)    is the standard editor [4]. It was already there before UnixV1
nc(1)    was originally written by "[email protected]" in the early '90s

-+-+-+

[1] gopher://republic.circumlunar.space/0/~leeb/phlog/2019-01-23_Gopher-and-the-Jedi

[2] Just be aware that at least three different incarnations of netcat
exist, with incompatible options and, sometimes, incompatible
behaviours.

[3] gopher://dataswamp.org/1/~solene

[4] gopher://schinkel.bevuta.com/0/rants/ed.txt