summary refs log tree commit diff
path: root/scoop.1
blob: 0d41c12ae1c94a916698a920a418f0595f0d0f25 (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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
.Dd January 4, 2020
.Dt SCOOP 1
.Os
.
.Sh NAME
.Nm scoop
.Nd query IRC logs
.
.Sh SYNOPSIS
.Nm
.Op Fl gpqv
.Op Fl D Ar date
.Op Fl F Ar format
.Op Fl N Ar network
.Op Fl T Ar target
.Op Fl a Ar time
.Op Fl b Ar time
.Op Fl c Ar context
.Op Fl d Ar path
.Op Fl f Ar format
.Op Fl h Ar host
.Op Fl l Ar limit
.Op Fl m Ar regexp
.Op Fl n Ar nick
.Op Fl t Ar type
.Op Fl u Ar user
.Op Fl w Ar expr
.Op Ar search
.Nm
.Fl s
.
.Sh DESCRIPTION
The
.Nm
utility queries the
.Xr litterbox 1
IRC log database,
matching events on the intersection
of the criteria specified in arguments.
With no arguments,
all events in the database are matched.
Events are output in order
from oldest to newest.
.
.Pp
If standard output is a terminal,
colored output is piped to
.Ev PAGER
with
.Ev LESS=FRX
if it is not already set.
.
.Pp
The arguments are as follows:
.Bl -tag -width Ds
.It Fl D Ar date
Match events which occurred on
.Ar date ,
of the format
.Ar YYYY-MM-DD
or the keyword
.Cm now .
.
.It Fl F Ar format
Format timestamps using the
.Ar format
string,
similar to
.Xr strftime 3 ,
see
.Aq Lk https://www.sqlite.org/lang_datefunc.html .
The default format is ISO8601.
.
.It Fl N Ar network
Match events from
.Ar network .
.
.It Fl T Ar target
Match events
.Po
of type
.Cm kick
or
.Cm nick
.Pc
with the target nickname
.Ar target .
.
.It Fl a Ar time
Match events which occurred after
.Ar time ,
of the format
.Ar YYYY-MM-DD HH:MM:SS .
.
.It Fl b Ar time
Match events which occurred before
.Ar time ,
of the format
.Ar YYYY-MM-DD HH:MM:SS .
.
.It Fl c Ar context
Match events from
.Ar context ,
either a channel or query name.
.
.It Fl d Ar path
Set the database path.
The default path is as in
.Xr litterbox 1 .
.
.It Fl f Ar format
Set the output format to one of
.Cm plain ,
.Cm color ,
.Cm irc .
The
.Cm irc
format outputs events
as IRC protocol with
.Sy server-time
tags.
The default format is
.Cm color
if standard output is a terminal,
.Cm plain
otherwise.
.
.It Fl g
Group events by network and channel or query name.
.
.It Fl h Ar host
Match events from users with the hostname
.Ar host .
.
.It Fl l Ar limit
Limit the number of events matched,
ordered by most recent.
.
.It Fl m Ar regexp
Match events with messages
matching the modern regular expression
.Ar regexp .
See
.Xr re_format 7 .
.
.It Fl n Ar nick
Match events from users with the nickname
.Ar nick .
.
.It Fl p
Match only events from channels.
.
.It Fl q
Match only events from queries.
.
.It Fl s
Instead of performing a query,
launch the
.Xr sqlite3 1
shell for the database.
.
.It Fl t Ar type
Match events of
.Ar type .
The types are
.Cm privmsg ,
.Cm notice ,
.Cm action ,
.Cm join ,
.Cm part ,
.Cm quit ,
.Cm kick ,
.Cm nick ,
.Cm topic .
.
.It Fl u Ar user
Match events from users with the username
.Ar user .
.
.It Fl v
Print the expanded SQL query being used to standard error.
.
.It Fl w Ar expr
Add the SQL expression
.Ar expr
to the
.Sy WHERE
clause of the query.
This option can only be used once.
.
.It Ar search
Match events using full-text search.
The searchable columns are
.Li network ,
.Li channel ,
.Li query ,
.Li nick ,
.Li user ,
.Li target ,
.Li message .
For search query syntax, see
.Aq Lk https://www.sqlite.org/fts5.html#full_text_query_syntax .
.El
.
.Sh ENVIRONMENT
.Bl -tag -width Ds
.It Ev PAGER
The command to pipe terminal output to.
The default is
.Ev PAGER=less .
.El
.
.Sh SEE ALSO
.Xr litterbox 1
.
.Sh AUTHORS
.An June Bug Aq Mt june@causal.agency
.
.Sh BUGS
Send mail to
.Aq Mt june@causal.agency
or join
.Li #ascii.town
on
.Li chat.freenode.net .
d=a96f2890f41e0b9b0ffa1bcdb1dddbef28c01662&follow=1'>ui-ssdiff: ban strcat()Christian Hesse Git upstream bans strcat() with commit: banned.h: mark strcat() as banned 1b11b64b815db62f93a04242e4aed5687a448748 Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11ui-ssdiff: ban strncpy()Christian Hesse Git upstream bans strncpy() with commit: banned.h: mark strncpy() as banned e488b7aba743d23b830d239dcc33d9ca0745a9ad Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11ui-shared: ban strcat()Christian Hesse Git upstream bans strcat() with commit: banned.h: mark strcat() as banned 1b11b64b815db62f93a04242e4aed5687a448748 To avoid compiler warnings from gcc 8.1.x we get the hard way. Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11ui-patch: ban sprintf()Christian Hesse Git upstream bans sprintf() with commit: banned.h: mark sprintf() as banned cc8fdaee1eeaf05d8dd55ff11f111b815f673c58 Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11ui-log: ban strncpy()Christian Hesse Git upstream bans strncpy() with commit: banned.h: mark strncpy() as banned e488b7aba743d23b830d239dcc33d9ca0745a9ad Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11ui-log: ban strcpy()Christian Hesse Git upstream bans strcpy() with commit: automatically ban strcpy() c8af66ab8ad7cd78557f0f9f5ef6a52fd46ee6dd Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11parsing: ban sprintf()Christian Hesse Git upstream bans sprintf() with commit: banned.h: mark sprintf() as banned cc8fdaee1eeaf05d8dd55ff11f111b815f673c58 Signed-off-by: Christian Hesse <mail@eworm.de> 2018-09-11parsing: ban strncpy()Christian Hesse Git upstream bans strncpy() with commit: banned.h: mark strncpy() as banned e488b7aba743d23b830d239dcc33d9ca0745a9ad Signed-off-by: Christian Hesse <mail@eworm.de> 2018-08-28filters: generate anchor links from markdownChristian Hesse This makes the markdown filter generate anchor links for headings. Signed-off-by: Christian Hesse <mail@eworm.de> Tested-by: jean-christophe manciot <actionmystique@gmail.com> 2018-08-03Bump version.Jason A. Donenfeld Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2018-08-03clone: fix directory traversalJason A. Donenfeld This was introduced in the initial version of this code, way back when in 2008. $ curl http://127.0.0.1/cgit/repo/objects/?path=../../../../../../../../../etc/passwd root:x:0:0:root:/root:/bin/sh ... Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Jann Horn <jannh@google.com> 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev