GOPHFILT(1)

πŸ’– GOPHFILT(1) πŸ’–

okay so bestie, welcome to GOPHFILT(1), straight out of the General Commands Manual β€” this is the whole vibe, let's get into it 🫢


✨ NAME ✨

gophfilt β€” oneshot connection to a gopher document server 🌈


🌸 SYNOPSIS 🌸

gophfilt [-t type] [-p path] [-h host] [-s port] [-i item]

πŸ¦‹ DESCRIPTION πŸ¦‹

ngl, gophfilt is a oneshot, command line driven version of a gopher client, and it's literally made for shell- or awk-scripts. it's giving "tiny but mighty" πŸ’…

so, the Internet Gopher is a distributed document delivery service. it lets even a total neophyte user access all kinds of data sitting on multiple hosts in a seamless fashion β€” no cap. the way it works: it presents the user a hierarchical arrangement of documents, and it uses a client-server communications model. the Internet Gopher Server accepts simple queries, and responds by sending the client a document. iconic behaviour, honestly πŸ‘‘

now, gophfilt can operate in either of two modes:

mode one is in the spirit of unix filters β€” it accepts requests on stdin and writes results to stdout. the request is in the form of a tab-delimited .cache item. for example:

1Master Gopher at UMN    1/   gopher.tc.umn.edu   70

(or in string notation)

"1Master Gopher at UMN\t1/\tgopher.tc.umn.edu\t70\n"

this example would result in the retrieval of the root directory from the Master Gopher. slay πŸŽ€

mode two lets you construct a gopher request from arguments provided on the command line. in this "manual" mode, at least the path and type items must be provided, fr fr. the default host and port are taken from the file conf.h at module build time. iykyk.

here's the flag rundown, bestie, every single one:

  • -p β€” specifies the path to the requested data. from our "filter" example above, the field 1/ is the path.
  • -t β€” specifies the type of the requested data. from our example above, the leading 1 character is the type (directory, in this case).
  • -h β€” specifies the name of the host where the server is to be found. the default host (CLIENT1_HOST from file conf.h) is used if not provided.
  • -s β€” specifies the service (port) that the server is monitoring. the default port (CLIENT1_PORT from file conf.h) is used if not provided.
  • -i β€” specifies a search item. this field immediately follows the path field in the transmitted request.
  • -T β€” specifies a receiver timeout in seconds. this is the maximum time that gophfilt will wait for more data.
⚠️ okay important one: if the "timeout" return value is noticed by the calling program, any data received to that point should be considered suspect. don't trust it, bestie, that data is going through it 😭

to recreate the request from our example using manual operation, one would execute the following command:

gophfilt -t 1 -p 1/ -h gopher.tc.umn.edu -s 70

πŸ”₯ MORE EXAMPLES πŸ”₯

here is an example that demonstrates the usefulness of the gophfilt. this specific example only works on the Rutgers campus, but it illustrates the point β€” lowkey iconic 🧚

gophfilt -t 0 -p "webster default SPELL" -i flatulence
  -h hangout.rutgers.edu -s 770 | gophfilt

this example requests a selector item from the Webster's Dictionary, and then pipes that item to gophfilt for subsequent retrieval of the actual definition. the result is available on stdout for use. periodt πŸ’œ


⭐ RETURNS ⭐

gophfilt returns the following completion codes on exit:

  • 0 β€” successful completion. πŸ’–
  • -1 β€” error in parsing command line arguments.
  • -2 β€” manual operation and insufficient parameters were provided.
  • -3 β€” piped operation and unable to read selector from stdin.
  • -4 β€” unsupported item type requested.
  • -5 β€” unable to connect to specified host and port combination.
  • -6 β€” error encountered writing to stdout.
  • -7 β€” timeout occurred while waiting for more data.

πŸ’€ not a single one of those negative codes is a vibe, but now you know exactly what each one means, so you're basically unstoppable πŸ“

aaaand that's the whole page bestie β€” you just read GOPHFILT(1) from the General Commands Manual, and honestly? you ate. go filter some gopher docs, main character energy only πŸ‘‘βœ¨πŸ’