commit ae9b02cbe88934b4bcd079682c84d754666bd190
parent c9099743767d8c2e0c9a1d067fab9966b672641c
Author: William Casarin <jb55@jb55.com>
Date: Sun, 5 Dec 2021 16:14:22 -0800
dist: update makefile, fix docs
Diffstat:
6 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -3,6 +3,6 @@
/.build-result
/.buildcmd
/.direnv
-/dist
+/dist/*.tar.gz
/.envrc
/default.nix
diff --git a/Makefile b/Makefile
@@ -13,12 +13,15 @@ dist:
@mkdir -p dist
@grep '^#define VERSION' datefmt.c | sed -En 's,.*"([^"]+)".*,\1,p' | xargs -I{} git archive HEAD --format tar.gz --prefix datefmt-{}/ -o dist/datefmt-{}.tar.gz
@ls -dt dist/* | head -n1 | xargs echo "tgz "
+ cd dist;\
+ sha256sum *.tar.gz > SHA256SUMS.txt;\
+ gpg --sign --armor --detach-sig --output SHA256SUMS.txt.asc SHA256SUMS.txt
datefmt: datefmt.c
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
install: datefmt docs
- install -Dm644 doc/datefmt.1 $(PREFIX)/share/man/man1/gmnisrv.1
+ install -Dm644 doc/datefmt.1 $(PREFIX)/share/man/man1/datefmt.1
install -Dm755 datefmt $(PREFIX)/bin/datefmt
doc/datefmt.1: doc/datefmt.scd
diff --git a/dist/SHA256SUMS.txt b/dist/SHA256SUMS.txt
@@ -1 +1 @@
-464ad7406f7b92fdd6d648b0fbb52573647c4b95b404303b2622adfcbc30f02a datefmt-0.2.tar.gz
+3dab9cf8e58915d0880cb9f69856be041941f21009d0572644064b200606d65f datefmt-0.2.tar.gz
diff --git a/dist/SHA256SUMS.txt.asc b/dist/SHA256SUMS.txt.asc
@@ -1,7 +1,7 @@
-----BEGIN PGP SIGNATURE-----
-iHUEABYIAB0WIQSQ7rIUn2aJYi7/WV+hPC42Muo01wUCYa1VfgAKCRChPC42Muo0
-167hAP9/R1iJ3CMypRoi1egr3Cb0zECrF5AiJGysWlodMywzFwD8CILbvHuvzFFH
-ZQRG8pTbGHExqAh6KHxG+k24rPo3XgY=
-=QDQo
+iHUEABYIAB0WIQSQ7rIUn2aJYi7/WV+hPC42Muo01wUCYa1t5QAKCRChPC42Muo0
+17S8AQDQ/7goFtHi8BJXqJWqAnfAiDnJPVDHCXwpNvXq5HpPZAEAwXImPJZ9sKDO
+1nonYVhZFrmON6wUp8azI4QS8Z3rvg4=
+=gpNP
-----END PGP SIGNATURE-----
diff --git a/doc/datefmt.1 b/doc/datefmt.1
@@ -13,7 +13,7 @@ datefmt - format timestamps in text streams
.P
.SH SYNPOSIS
.P
-\fBdatefmt\fR [--after timestamp] [--before timestamp] [--future] [--past] [--version] [--ms]
+\fBdatefmt\fR [--after timestamp] [--before timestamp] [--past] [--future] [--version] [--ms]
.P
.SH DESCRIPTION
.P
@@ -23,6 +23,16 @@ to convert these timestamps into formatted dates.\&
.P
.SH OPTIONS
.P
+\fB-a, --after <timestamp>\fR
+.RS 4
+only format timestamps after this date (default: 2000-01-01Z)
+.P
+.RE
+\fB-b, --before <timestamp>\fR
+.RS 4
+only format timestamps before this date
+.P
+.RE
\fB-p, --past\fR
.RS 4
only format timestamps in the past
@@ -33,14 +43,14 @@ only format timestamps in the past
only format timestamps in the future
.P
.RE
-\fB--version\fR
+\fB-m, --ms\fR
.RS 4
-display version and exit
+interpret timestamps as milliseconds instead of seconds
.P
.RE
-\fB-m, --ms\fR
+\fB--version\fR
.RS 4
-interpret timestamps as milliseconds instead of seconds
+display version and exit
.P
.RE
.SH FORMAT
diff --git a/doc/datefmt.scd b/doc/datefmt.scd
@@ -6,7 +6,7 @@ datefmt - format timestamps in text streams
# SYNPOSIS
-*datefmt* [--after timestamp] [--before timestamp] [--future] [--past] [--version] [--ms]
+*datefmt* [--after timestamp] [--before timestamp] [--past] [--future] [--version] [--ms]
# DESCRIPTION
@@ -16,18 +16,24 @@ to convert these timestamps into formatted dates.
# OPTIONS
+*-a, --after <timestamp>*
+ only format timestamps after this date (default: 2000-01-01Z)
+
+*-b, --before <timestamp>*
+ only format timestamps before this date
+
*-p, --past*
only format timestamps in the past
*-f, --future*
only format timestamps in the future
-*--version*
- display version and exit
-
*-m, --ms*
interpret timestamps as milliseconds instead of seconds
+*--version*
+ display version and exit
+
# FORMAT
a strftime(3) format string. defaults to '%F %R'