tAdd manpage for scribo(1) - scribo - Email-based phlog generator
(HTM) git clone git://git.z3bra.org/scribo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 18d85f2f9cdb2bb3c8f5eb6274bbbb394eda2c89
(DIR) parent ae63de9aff699eb118c7a85efe365c030cceea9e
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Wed, 9 Sep 2020 18:04:01 +0200
Add manpage for scribo(1)
Diffstat:
M makefile | 5 ++++-
A scribo.1 | 96 +++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/makefile b/makefile
t@@ -8,12 +8,15 @@ scribo.o: config.h
.def.h.h:
cp $< $@
-install: scribo
+install: scribo scribo.1
mkdir -p ${DESTDIR}${PREFIX}/bin
+ mkdir -p ${DESTDIR}${MANDIR}/man1
cp scribo ${DESTDIR}${PREFIX}/bin/scribo
+ cp scribo.1 ${DESTDIR}${MANDIR}/man1/scribo.1
uninstall:
rm ${DESTDIR}${PREFIX}/bin/scribo
+ rm ${DESTDIR}${MANDIR}/man1/scribo.1
clean:
rm -f scribo *.o
(DIR) diff --git a/scribo.1 b/scribo.1
t@@ -0,0 +1,96 @@
+.Dd 2020-09-09
+.Dt SCRIBO 1
+.Os POSIX.1-2017
+
+.Sh NAME
+.Nm scribo
+.Nd email-based gopherlog generator
+
+.Sh SYNOPSIS
+.Nm
+.Op Fl h
+.Op Fl a Ar address
+.Op Fl b Ar basedir
+.Op Fl d Ar datefmt
+.Op Fl io Ar file
+.Op Fl x Ar command
+
+.Sh DESCRIPTION
+.Nm
+turns emails into a gopherlog, (also named "rlog", or "phlog").
+.Pp
+Each mail will be parsed, and written out in plain text. The subject
+and date of the email are extracted from the headers (according to
+rfc5322), and used to add a title, and date to each entry.
+.Pp
+After processing the email, a gph file will be generated
+from the list of existing entries in the directory
+.Ar basedir .
+.Bl -tag -width Ds
+.It Fl h
+Print a quick usage text.
+.It Fl a Ar address
+Only process emails originated from
+.Ar address .
+This will be checked against the internet address extracted according
+to the rfc5322 specification.
+.It Fl b Ar basedir
+Specify directory where log entries and gopher map should be written.
+.Nm
+will try to change to this directory, and stop processing if it cannot
+change to this directory, or write files into it.
+.It Fl d Ar datefmt
+Change the date format appended to each entry. Format specified should
+be a valid format to pass to
+.Xr strftime 3 .
+.It Fl i Ar file
+Read email from
+.Ar file
+rather than
+.Pa stdin .
+.It Fl o Ar file
+Write gopher map to
+.Ar file
+rather than
+.Pa stdout .
+.It Fl x Ar command
+Pass email body through
+.Ar command
+before writing it on disk. Note that this will only affect the email body,
+not the title or date.
+.El
+
+.Sh EXAMPLES
+Call
+.Nm
+from an
+.Xr aliases 5
+file:
+.Bd -literal
+ name+rlog@domain.tld |/usr/local/bin/scribo -b /var/gopher/rlog -o index.gph -a name@domain.tld -x "fmt -w 69"
+.Ed
+.Pp
+Every mail received at
+.Ad name+rlog@domain.tld
+will update the gopher log in
+.Pa /var/gopher/rlog .
+Every entry will be filtered through
+.Xr fmt 1
+to limit text width at 69 chars (for sweet gopher rendering).
+
+.Sh ENVIRONMENT
+.Bl -tag -width "SHELL"
+.It Ev SHELL
+This variable defines the shell used to interpret the filter command.
+The shell must accept the POSIX compliant
+.Fl c
+flag to pass the command string.
+.El
+
+.Sh SEE ALSO
+.Xr aliases 5 ,
+.Xr forward 5 ,
+.Xr smtpd 8
+
+.Sh AUTHORS
+.An Willy Goiffon Aq Mt dev@z3bra.org