|
|
|
@ -7,20 +7,42 @@ an ed-based client by Solene Rapenne (gopher://bitreich.org/1/usr/solene/). |
|
|
|
|
|
|
|
|
|
`gophed` is distributed under the MIT License. A copy of the LICENSE is |
|
|
|
|
available in the repo. |
|
|
|
|
|
|
|
|
|
Dependencies |
|
|
|
|
================== |
|
|
|
|
|
|
|
|
|
`gophed` requires only: |
|
|
|
|
|
|
|
|
|
- a POSIX shell (/bin/sh) |
|
|
|
|
- netcat (nc) |
|
|
|
|
- ed (the standard editor!) |
|
|
|
|
- awk |
|
|
|
|
- cut |
|
|
|
|
- sed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage |
|
|
|
|
=========== |
|
|
|
|
|
|
|
|
|
The first time you run `gophed` you need to initialise it via: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
./gophed -i |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
This will create a few symlinks in the current folder, namely `g`, `v`, |
|
|
|
|
and `d`, which will be used as `gophed` commands. Once `gophed` has |
|
|
|
|
been initialised, you can start visiting some gopherholes: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
./gophed / kalos.mine.nu 70 |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
or equivalently: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
./v / kalos.mine.nu 70 |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
This command will download the corresponding resource, and print it on |
|
|
|
|
output with line numbers. An excerpt is reported below: |
|
|
|
@ -51,8 +73,11 @@ can change the default prompt to any single character by changing the |
|
|
|
|
PROMPT variable. Now, if you want to visit the selector at line 23, you |
|
|
|
|
would type: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
!./g % 24 [ENTER] |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
at the prompt. This will effectively spawn another `gophed` instance, |
|
|
|
|
telling it to get the selector at line 23 in the current document, and |
|
|
|
|
to load the corresponding resource. In this case we will have something |
|
|
|
@ -86,34 +111,46 @@ like: |
|
|
|
|
|
|
|
|
|
Well, if you want now to go to the resource at line 17, you would type: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
!./g % 17 [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
when you are done with viewing the current resource, you just type: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
q [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
at the `gophed` prompt (well, that one is indeed ed(1) prompt...), and |
|
|
|
|
you will be back at the gopher resources you had visited before. Typing |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
q [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
again will bring you back in history again. If you give a `q` command on |
|
|
|
|
the first page, you will leave `gophed`. If you would instead like to |
|
|
|
|
save the resource pointed by a selector, you will use the command: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
!./d % NUMBER [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
where NUMBER is the number of the line where the selector appears in the |
|
|
|
|
current page. The resource will be saved at "HOSTNAME/URI" where |
|
|
|
|
HOSTNAME is the name of the host and URI is the path to the resource. |
|
|
|
|
If you don't remember which line is which, you can just give: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
%n [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
at the prompt. If you don't remember which resource you are currently |
|
|
|
|
visiting, typing: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
f [ENTER] |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
at the `gophed` prompt will give some hints. If you are an ed(1) user, |
|
|
|
|
you will totally understand what we are up to here, and probably will |
|
|
|
@ -121,8 +158,6 @@ now have a good laugh. If you don't know how to use ed(1), instead, then |
|
|
|
|
this is probably the right time to start learning it. Remember: ed(1) is |
|
|
|
|
the standard editor, and an awesome one at that... |
|
|
|
|
|
|
|
|
|
HND |
|
|
|
|
HH |
|
|
|
|
|
|
|
|
|
KatolaZ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|