commit: 75b70f9accd48368f08e3de6ba837336d5bcd964
parent 12c014335408617a6b42fe9b20961fcf48fdd92d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Nov 2024 10:54:45 +0100
deblob.1: document JSON output format
Diffstat:
M | deblob.1 | 30 | +++++++++++++++++++++++++++--- |
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/deblob.1 b/deblob.1
@@ -9,7 +9,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl cn
-.Op Fl d Ar working directory
+.Op Fl d Ar workdir
.Op Fl e Ar excluded path ...
.Op Fl j Ar file
.Sh DESCRIPTION
@@ -26,13 +26,16 @@ The options are as follows:
.Bl -tag -width Ds
.It Fl c
Return error if any non-excluded blobs were found.
-.It Fl d Ar working directory
+.It Fl d Ar workdir
Directory to be scanned rather than the current working directory on execution.
.It Fl e Ar excluded path
Paths to be excluded from removal, accepts shell-style globbing.
Pass the option multiple times to do multiple exclusions.
.It Fl j Ar file
-JSON file to log actions taken and metadata into, intended to be used by other programs.
+JSON file to log actions taken and metadata into.
+See
+.Sx JSON OUTPUT FORMAT
+section.
.It Fl n
Scan the files but do not actually delete them.
.El
@@ -52,6 +55,27 @@ Option
.Fl c
passed and matching blobs were found.
.El
+.Sh JSON OUTPUT FORMAT
+When the
+.Fl j Ar file
+option is set,
+.Nm
+writes a JSON list of objects containing the following keys:
+.Bl -tag -width format
+.It action
+Action which
+.Nm
+took.
+For example: "ignoring", "detected", "removing".
+.It format
+Short description of the detected format, intended for humans.
+No stability guarantees.
+.It path
+Path of the matched file, relative to the working directory, as changed by
+.Cm cd
+and
+.Fl d Ar workdir .
+.El
.Sh SUPPORTED FORMATS
Blobs scanned against are the following:
.Bl -dash -compact