summaryrefslogtreecommitdiff
path: root/sfeed_gopher.1
blob: bc45121bcc950c0f91ad14e8d16e6309d9d251f1 (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
.Dd May 14, 2022
.Dt SFEED_GOPHER 1
.Os
.Sh NAME
.Nm sfeed_gopher
.Nd format feed data to Gopher files
.Sh SYNOPSIS
.Nm
.Op Ar
.Sh DESCRIPTION
.Nm
formats feed data (TSV) from
.Xr sfeed 1
from stdin or for each
.Ar file
to stdout in the raw Gopher output format.
.Pp
If one or more
.Ar file
arguments are specified then the basename of the
.Ar file
is used as the feed name in the output.
.Nm
creates an index file named "index" and for each feed it creates a file with
the same name as the basename of the feed
.Ar file .
.Pp
If no
.Ar file
arguments are specified and so the data is read from stdin then the data is
written to stdout and no files are written.
.Pp
Items with a timestamp from the last day compared to the system time at the
time of formatting are counted and marked as new.
This value might be overridden through environment variables.
Items are marked as new with the prefix "N" at the start of the line.
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev SFEED_GOPHER_PATH
This environment variable can be used as the prefix for each path in the
index file.
The default is "/".
.It Ev SFEED_GOPHER_HOST
This environment variable can be used as the Gopher Host field.
The default is "127.0.0.1".
.It Ev SFEED_GOPHER_PORT
This environment variable can be used as the Gopher Port field.
The default is "70".
.It Ev SFEED_NEW_AGE
Overwrite the maximum age in seconds to mark feeds as new.
By default this is 86400, which equals one day.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Bd -literal
SFEED_GOPHER_HOST="codemadness.org" SFEED_GOPHER_PATH="/feeds/" \e
	sfeed_gopher ~/.sfeed/feeds/*
.Ed
.Sh SEE ALSO
.Xr sfeed 1 ,
.Xr sfeed 5
.Sh STANDARDS
.Rs
.%D March 1993
.%R RFC 1436
.%T The Internet Gopher Protocol
.Re
.Sh AUTHORS
.An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org
.Sh CAVEATS
The common-used 'h' and 'i' types are used in this program.
These types are an extension to Gopher.