summary refs log tree commit diff
path: root/README.7
blob: 14ada0d3d659828fe8945117be6448addf5d1549 (plain) (blame)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
.Dd August 23, 2020
.Dt README 7
.Os "Causal Agency"
.
.Sh NAME
.Nm scooper
.Nd web interface for litterbox
.
.Sh DESCRIPTION
.Nm
is a CGI and FastCGI
web interface for
.Lk https://git.causal.agency/litterbox "litterbox"
1.4 and later.
It provides IRC log listings
and full-text search.
.
.Sh INSTALLING
.Nm
targets
.Fx ,
.Ox
and Linux,
and requires
.Lk "https://kristaps.bsd.lv/kcgi/" kcgi
and SQLite.
.
.Bd -literal -offset indent
\&./configure
make all
make install
.Ed
.
.Pp
On
.Fx
and
.Ox ,
.Nm
is statically linked
so it can easily run in
.Xr chroot 2
with
.Xr kfcgi 8 .
The default install
.Ev PREFIX
is also set to
.Pa ~/.local ,
which is a convenient
.Xr chroot 2
path with access to the default
.Xr litterbox 1
database.
.
.Sh DEPLOYMENT
.Nm
automatically detects
if it is being run as CGI
or as a FastCGI worker.
The
.Xr kfcgi 8
daemon included with
.Xr kcgi 3
can be used to run FastCGI workers.
.
.Pp
.Nm
can be configured on the command line
or through environment variables.
See
.Xr scooper 1
for details.
.
.Ss nginx
Use
.Xr kfcgi 8
to run
.Nm
as the user who owns
.Xr litterbox 1 :
.Bd -literal -offset indent
kfcgi -u www -s /var/run/scooper.sock \e
	-U $user -p /home/$user/.local \e
	-- /bin/scooper /share/litterbox/litterbox.sqlite
.Ed
.Pp
Configure
.Xr nginx 8
to serve
.Nm
at
.Pa /scooper/ ,
for example:
.Bd -literal -offset indent
location /scooper/ {
	fastcgi_pass unix:/var/run/scooper.sock;
	fastcgi_split_path_info (/scooper)(.*);
	fastcgi_param PATH_INFO $fastcgi_path_info;
	include fastcgi_params;
}
.Ed
.
.Ss OpenBSD httpd
Use
.Xr kfcgi 8
to run
.Nm
as the user who owns
.Xr litterbox 1 :
.Bd -literal -offset indent
kfcgi -u www -s /var/www/run/scooper.sock \e
	-U $user -p /home/$user/.local \e
	-- /bin/scooper /share/litterbox/litterbox.sqlite
.Ed
.Pp
Configure
.Xr httpd 8
to serve
.Nm
at
.Pa /scooper/ ,
for example:
.Bd -literal -offset indent
location "/scooper/*" {
	request strip 1
	fastcgi socket "/run/scooper.sock"
}
.Ed
.
.Ss catsit
On
.Fx
and
.Ox ,
the
.Xr kfcgi 8
daemon can be managed by the
.Lk https://git.causal.agency/catsit/ catsit
process supervisor.
For example with the following lines in
.Xr catsit.conf 5 :
.Bd -literal -offset indent
% sock=/var/run/scooper.sock
% scooper='/bin/scooper /share/litterbox/litterbox.sqlite'
@scooper kfcgi -d -u www -s $sock -U $USER -p ~/.local -- $scooper
.Ed
.
.Sh FILES
.Bl -tag -width "default.css" -compact
.It Pa server.h
shared declarations and inline functions
.It Pa server.c
CGI and FastCGI dispatch
.It Pa networks.c
networks page handler
.It Pa contexts.c
contexts page handler
.It Pa events.c
events page handler
.It Pa search.c
search page handler
.It Pa html.c
shared HTML generation
.It Pa default.css
default stylesheet
.It Pa color.css
IRC color definitions
.It Pa css.sh
CSS concatenation for static inclusion
.El
.
.Sh CONTRIBUTING
The upstream URL of this project is
.Aq Lk https://git.causal.agency/scooper .
Contributions in any form can be sent to
.Aq Mt list+scooper@causal.agency .
For sending patches by email, see
.Aq Lk https://git-send-email.io .
.
.Sh SEE ALSO
.Xr scooper 1
.
.Pp
.Lk https://git.causal.agency/litterbox "litterbox"