summaryrefslogtreecommitdiffstats
path: root/network/gmi100/gmi100.1
blob: 51c022e5de58bbd011a3761c314b6ad19041bb88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
.TH GMI100 1 "2024-03-03"
.SH NAME
gmi100 \- Gemini CLI protocol client written in 100 lines of ANSI C.
.SH SYNOPSIS
.B gmi100
.IR [PAGER]
.SH DESCRIPTION
Other similar Gemini client projects written in few lines of code
successfully shows how simple Gemini protocol is. This code is far from
straight forward. But I had a different goal in mind.

I tried to pack as much as possible in 100 lines of ANSI C. Initially I
struggled to fit simple TLS connection in such small space but
eventually I ended up with CLI client capable of efficient navigation
between capsules of Gemini space.

.SH ACTIONS
.TP
.BR "N"
Number of link on current capsule
.TP
.BR "r"
Refresh current capsule
.TP
.BR "u"
Go "up" in URL directory path
.TP
.BR "b"
Go back in browsing history
.TP
.BR "c"
Print current capsule URI
.TP
.BR "q" 
Quit
.TP
.BR "?" 
Search, geminispace.info/search is used by default
.TP
.BR "!"
Shell command prefixed, run it on current capsule
.
.SH USAGE EXAMPLES 
.
.TP
.BR "gmi100 cat"
Using "cat" as pager
.TP
.BR "gmi100> ACTION"
On prompt: execute any action (as above mentioned)
.TP
.BR "gmi100> geminiprotocol.net"
On prompt: go to capsule
.TP
.BR "gmi100> 3"
On prompt: go to link number 3 of current capsule
.TP
.BR "gmi100> !nsxiv"
On prompt: open file of current URL with nsxiv (image)
.
.SH HISTORY
After you run the program it will open or create history .gmi100 file.
Then every page you visits that is not a redirection to other page and
doesn't ask you for input will be appended at the end of history file.
File is never cleaned up by program itself to make history persistent
between sessions but that means cleaning up browsing history is your
responsibility. But this also gives you an control over history file
content. You can for example append some links that you want to visit
in next session to have easier access to them just by running program
and pressing "b" which will navigate to last link from history file.

During browsing session typing "b" in program prompt for the first time
will result in navigation to last link in history file. Then if you
type "b" again it will open second to last link from history. But it
will also append that link at the end. You can input "b" multiple times
and it will always go back by one link in history and append it at then
end of history file at the same time. Only if you decide to navigate to
other page by typing URL or choosing link number you will break that
cycle. Then history "pointer" will go back to the very bottom of the
history file.

.SH AUTHOR
irek@gabr.pl