gopher-validator.1 - gopher-validator - Gopher validator and happy helper | |
git clone git://git.codemadness.org/gopher-validator | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
gopher-validator.1 (2020B) | |
--- | |
1 .Dd January 9, 2020 | |
2 .Dt GOPHER-VALIDATOR 1 | |
3 .Os | |
4 .Sh NAME | |
5 .Nm gopher-validator | |
6 .Nd a simple gopher validator | |
7 .Sh SYNOPSIS | |
8 .Nm | |
9 .Op Ar url | |
10 .Op Ar param | |
11 .Sh DESCRIPTION | |
12 .Nm | |
13 reads raw Gopher data from stdin. | |
14 .Pp | |
15 When an | |
16 .Ar url | |
17 is specified it retrieves the raw Gopher data from this url. | |
18 .Pp | |
19 When a | |
20 .Ar param | |
21 is specified it will be added after the selector as a (search) parameter. | |
22 .Pp | |
23 When the environment variable | |
24 .Ev QUERY_STRING | |
25 is set the program runs in Command Gateway Interface (CGI) mode. | |
26 It will use the content of this variable as if it was | |
27 .Ar url . | |
28 .Pp | |
29 CGI-mode has precedence over command-line arguments. | |
30 .Pp | |
31 .Nm | |
32 validates Gopher data of directory (1) and search types (7). | |
33 .Sh EXIT STATUS | |
34 When there is a fatal error the exitcode is 2. | |
35 When there is any Gopher error the exitcode is 1. | |
36 When there is no error (could still have a warning) the exitcode is 0. | |
37 .Sh EXAMPLES | |
38 .Bd -literal | |
39 printf '\\r\\n' | nc codemadness.org 70 | gopher-validator | |
40 .Ed | |
41 .Bd -literal | |
42 gopher-validator gopher://codemadness.org/1 | |
43 .Ed | |
44 .Sh DIAGNOSTICS | |
45 The following output format is used for the fatal, error and warning mes… | |
46 These are prefixed with the following texts: | |
47 .Bl -tag -width Ds | |
48 .It Qq "fatal: " | |
49 .Pp | |
50 Fatal program errors such as connection errors. | |
51 These messages are written to stderr, unless | |
52 .Nm | |
53 runs in CGI mode. | |
54 .It Qq "error: " | |
55 .Pp | |
56 Gopher errors violating the RFC specification. | |
57 These messages are written to stdout. | |
58 .It Qq "warning: " | |
59 .Pp | |
60 Recommendations according to the RFC specification. | |
61 These messages are written to stdout. | |
62 .El | |
63 .Pp | |
64 If possible the messages are also prefixed with the output line number. | |
65 .Sh SEE ALSO | |
66 .Xr nc 1 | |
67 .Sh STANDARDS | |
68 RFC1436 is followed as closely as possible. | |
69 The only deviation is checking for UTF-8 instead of LATIN-1 text encodin… | |
70 for now. | |
71 .Nm | |
72 uses the standard C library locale functions and respects the user locale | |
73 environment. | |
74 To check text encoding it is assumed | |
75 .Nm | |
76 runs in the same locale environment as the server. | |
77 .Sh AUTHORS | |
78 .An Hiltjo Posthuma Aq Mt [email protected] |