summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-13 00:52:38 -0500
committerJune McEnroe <june@causal.agency>2019-12-13 00:52:38 -0500
commitf97207781d7464ea066ae9ddacf3427c8576b7e8 (patch)
tree1908568e38cf0649cb730a2a6a647aa6cc8b1ff0
parentInfer context from input paths (diff)
downloadlitterbox-f97207781d7464ea066ae9ddacf3427c8576b7e8.tar.gz
litterbox-f97207781d7464ea066ae9ddacf3427c8576b7e8.zip
Document context inferrence in unscoop
-rw-r--r--unscoop.163
1 files changed, 38 insertions, 25 deletions
diff --git a/unscoop.1 b/unscoop.1
index 32ca23b..ac8a625 100644
--- a/unscoop.1
+++ b/unscoop.1
@@ -1,4 +1,4 @@
-.Dd December 7, 2019
+.Dd December 12, 2019
 .Dt UNSCOOP 1
 .Os
 .
@@ -8,11 +8,12 @@
 .
 .Sh SYNOPSIS
 .Nm
-.Fl C Ar context
-.Fl N Ar network
+.Op Fl C Ar context
+.Op Fl N Ar network
 .Op Fl d Ar path
 .Op Fl f Ar format
 .Ar
+.
 .Nm
 .Fl D
 .Op Fl d Ar path
@@ -23,24 +24,25 @@ The
 utility imports IRC logs into the
 .Xr litterbox 1
 database.
+The network and context (channel or query) names
+are inferred from the input file paths,
+so
+.Nm
+should be run from the log directory root.
 .
 .Pp
 The arguments are as follows:
 .Bl -tag -width Ds
 .It Fl C Ar context
-Set the channel or query name of the imported logs.
-Contexts beginning with
-.Sq #
-or
-.Sq &
-are assumed to be channels.
+Override the context (channel or query) name
+of imported logs.
 .
 .It Fl D
-Delete duplicate events caused by overlapping imports.
+Delete duplicate events from overlapping imports.
 This operation requires SQLite version 3.25.0 or newer.
 .
 .It Fl N Ar network
-Set the network name of the imported logs.
+Override the network name of the imported logs.
 .
 .It Fl d Ar path
 Set the database path.
@@ -51,31 +53,42 @@ The default path is as in
 .
 .It Fl f Ar format
 Set the input log format.
-The following formats are supported:
-.Sy catgirl ,
-.Sy generic ,
-.Sy irc ,
-.Sy textual .
 The default format is
-.Sy generic .
+.Cm generic .
 .Pp
-The
-.Sy generic
-format matches the following:
+The following formats are supported:
+.Bl -tag -width Ds
+.It Cm catgirl
+Logs from the catgirl IRC client.
+.It Cm generic
+Matches paths of the form
+.Pa network/context/*
+and messages of the following forms:
 .Bd -literal -offset indent
 [timestamp] <nick> privmsg
 [timestamp] -nick- notice
 [timestamp] * nick action
 .Ed
-.Pp
-The
-.Sy irc
-format matches IRC protocol messages
-tagged with the IRCv3.2
+.It Cm irc
+IRC protocol messages tagged with the IRCv3.2
 .Sy server-time
 extension.
+Network and context must be set with
+.Fl N
+and
+.Fl C .
+.It Cm textual
+Logs from the Textual IRC client.
+.El
 .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 ,
 .Xr scoop 1
title='2018-08-07 14:11:19 -0400'>2018-08-07Hack clang into checking uiFmt format stringsJune McEnroe 2018-08-07Handle PART and QUIT without messagesJune McEnroe 2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe This is so embarrassing. It only started crashing once it had strings that were long enough, and then it took me so long to notice this mistake. I was worried I was still doing va_list wrong somehow. 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe vaswprintf is a nightmare. 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe This is actually possible with use_default_colors! 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe Fall back to using bold if there are only 8 colors. This also allowed bright background colors in 16-color terminals. I must port this system to torus. I'll be able to remove the awful termcap patch hack. 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe Oh boy that's embarrassing. 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe Don't really have a way to implement the M-* keys, and currently missing C-w. 2018-08-04Handle /topicJune McEnroe