diff options
Diffstat (limited to '')
-rw-r--r-- | litterbox.1 | 33 | ||||
-rw-r--r-- | scoop.1 | 42 | ||||
-rw-r--r-- | unscoop.1 | 62 |
3 files changed, 72 insertions, 65 deletions
diff --git a/litterbox.1 b/litterbox.1 index b4911e4..d79e90e 100644 --- a/litterbox.1 +++ b/litterbox.1 @@ -25,12 +25,12 @@ .Op Ar config ... . .Nm -.Op Fl d Ar path .Fl i | m +.Op Fl d Ar path . .Nm -.Op Fl d Ar path .Fl b Ar path +.Op Fl d Ar path . .Sh DESCRIPTION The @@ -65,10 +65,13 @@ it will be migrated automatically when starts, or can be migrated explicitly with .Fl m . +Live backups of the database +can be made with +.Fl b . Instances of .Nm connected to different IRC networks -can share the same database. +will share the same database. . .Pp Options can be loaded from @@ -113,8 +116,6 @@ The searchable columns are .Li user , .Li target , .Li message . -For search query syntax, see -.Aq Lk https://www.sqlite.org/fts5.html#full_text_query_syntax . . .It Fl U Ar url , Cm scooper-url = Ar url Set the base URL of a @@ -147,8 +148,9 @@ it is loaded with . .It Fl d Ar path , Cm database = Ar path Set the path to the database file. -The default paths are documented in -.Sx FILES . +See +.Sx FILES +for the default paths. . .It Fl h Ar host , Cm host = Ar host Connect to @@ -211,8 +213,6 @@ The searchable columns are .Li user , .Li target , .Li message . -For search query syntax, see -.Aq Lk https://www.sqlite.org/fts5.html#full_text_query_syntax . . .It Fl t Ar path , Cm trust = Ar path Trust the self-signed certificate loaded from @@ -246,9 +246,7 @@ Configuration files are searched for first in usually .Pa ~/.config , followed by the colon-separated list of paths -.Ev $XDG_CONFIG_DIRS , -usually -.Pa /etc/xdg . +.Ev $XDG_CONFIG_DIRS . . .It Pa $XDG_DATA_DIRS/litterbox/litterbox.sqlite The database file is searched for first in @@ -256,11 +254,10 @@ The database file is searched for first in usually .Pa ~/.local/share , followed by the colon-separated list of paths -.Ev $XDG_DATA_DIRS , -usually -.Pa /usr/local/share:/usr/share . +.Ev $XDG_DATA_DIRS . +. .It Pa ~/.local/share/litterbox/litterbox.sqlite -The most likely default path to the database file. +The most likely default path of the database file. .El . .Sh EXAMPLES @@ -280,6 +277,8 @@ public-query .Sh SEE ALSO .Xr scoop 1 , .Xr unscoop 1 +.Pp +.Lk https://www.sqlite.org/fts5.html#full_text_query_syntax "Full-text Query Syntax" . .Sh STANDARDS .Bl -item @@ -332,7 +331,7 @@ daemon implements the and .Sy causal.agency/passive vendor-specific IRCv3 capabilities -implemented by +offered by .Xr pounce 1 . . .Sh AUTHORS diff --git a/scoop.1 b/scoop.1 index 7211990..0298232 100644 --- a/scoop.1 +++ b/scoop.1 @@ -53,19 +53,16 @@ The arguments are as follows: Match events which occurred on .Ar date , of the format -.Ar YYYY-MM-DD -or the keyword -.Cm now . +.Ar YYYY-MM-DD . . .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 ISO 8601. +.Xr strftime 3 . +The default format is +.Qq %Y-%m-%dT%H:%M:%S . . .It Fl L Output timestamps in local time @@ -91,9 +88,10 @@ Match events .Po of type .Cm kick , -.Cm nick -or +.Cm nick , .Cm ban +or +.Cm unban .Pc with the target nickname or mask .Ar target . @@ -123,19 +121,20 @@ The default path is as in .It Fl f Ar format Set the output format to one of .Cm plain , -.Cm color , +.Cm color +or .Cm irc . +The default format is +.Cm color +if standard output is a terminal, +.Cm plain +otherwise. 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. @@ -218,8 +217,6 @@ The searchable columns are .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 @@ -228,15 +225,16 @@ For search query syntax, see The command to pipe terminal output to. The default is .Ev PAGER=less . -.It Ev SHELL -The shell used to run -.Ev PAGER . -The default is -.Pa /bin/sh . .El . .Sh SEE ALSO .Xr litterbox 1 +.Bl -item +.It +.Lk https://www.sqlite.org/lang_datefunc.html "Date and Time Functions" +.It +.Lk https://www.sqlite.org/fts5.html#full_text_query_syntax "Full-text Query Syntax" +.El . .Sh AUTHORS .An June Bug Aq Mt june@causal.agency diff --git a/unscoop.1 b/unscoop.1 index ed1c157..4dbd01e 100644 --- a/unscoop.1 +++ b/unscoop.1 @@ -16,13 +16,14 @@ .Ar . .Nm -.Op Fl d Ar path .Fl D +.Op Fl d Ar path . .Sh DESCRIPTION The .Nm -utility imports IRC client logs into the +utility imports plain text IRC logs +into the .Xr litterbox 1 database. Network and channel or query names @@ -31,6 +32,12 @@ can be inferred from file paths, so should be run from the log directory root. . .Pp +The current path being imported +is printed to standard output. +Progress based on total file size +is printed to standard error. +. +.Pp The arguments are as follows: .Bl -tag -width Ds .It Fl D @@ -57,35 +64,45 @@ which must have been initialized by The default path is as in .Xr litterbox 1 . . -.It Fl f Ar format -Set the input log format to one of: -.Bl -tag -width Ds -.It Cm catgirl -The +.It Fl f Cm catgirl +Import logs from the .Xr catgirl 1 IRC client. -.It Cm generic -Matches paths of the form -.Pa network/context/* -and events of the following forms: +.Bd -literal -offset indent +find ~/.local/share/catgirl/log \e + -type f -name '*.log' -print0 | +xargs -0 unscoop -f catgirl +.Ed +. +.It Fl f Cm generic +Import logs using generic matchers. +This is the default. +Network and context names are inferred +from paths of the form +.Pa network/context/* . +Events of the following formats are matched: .Bd -literal -offset indent [timestamp] <nick> privmsg [timestamp] -nick- notice [timestamp] * nick action .Ed -.It Cm irc -Matches IRC protocol messages tagged with +. +.It Fl f Cm irc +Import logs formatted as +IRC protocol messages tagged with .Sy server-time . The network and context must be set with .Fl N and .Fl c . -.It Cm textual -The Textual IRC client. -.El -.Pp -The default format is -.Cm generic . +. +.It Fl f Cm textual +Import logs from the Textual IRC client. +.Bd -literal -offset indent +find Textual -type f -name '*.txt' \e + -not -path '*/Console/*' -print0 | +xargs -0 unscoop -f textual +.Ed . .It Fl v Print SQL @@ -93,13 +110,6 @@ Print SQL statements on standard error. .El . -.Sh EXAMPLES -.Bd -literal -find catgirl -type f -name '*.log' -print0 | xargs -0 unscoop -f catgirl -find Textual -type f -name '*.txt' -not -path '*/Console/*' -print0 \e - | xargs -0 unscoop -f textual -.Ed -. .Sh SEE ALSO .Xr litterbox 1 . |