From 9c885d3172da1865df9db8f07a607a23eb26a80f Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 13 May 2021 22:27:27 +0200 Subject: I'm a roff noob --- sdep.1 | 122 +++++++++++++++++++++++++++++------------------------------------ 1 file changed, 55 insertions(+), 67 deletions(-) diff --git a/sdep.1 b/sdep.1 index 8cbdd24..302c45d 100644 --- a/sdep.1 +++ b/sdep.1 @@ -1,106 +1,94 @@ -.TH SDEP 1 sdep\-VERSION - -.SH NAME -sdep \- a simple "date+event" line parser - -.SH SYNOPSIS -.B sdep -.RB [ \-dv ] -.IR "[+format]" -.RB [ \-f -.IR "[date]" ] -.RB [ \-t -.IR "[date]" ] -.RB [ \-w -.IR format ] -.RB [ \-s -.IR string ] - -.SH DESCRIPTION -.B sdep +.Dd May 13, 2021 +.Dt SDEP 1 +.Os +.Sh NAME +.Nm sdep +.Nd a simple "date+event" line parser + +.Sh SYNOPSIS +.Nm +.Op Fl dv +.Op Ar +format +.Op Fl f Op Ar date +.Op Fl t Op Ar date +.Op Fl w Ar format +.Op Fl s Ar string + +.Sh DESCRIPTION +.Nm reads lines of the form -.IR "date text" +.Dl Ar "date text" from stdin and writes to stdout those lines such that -.IR date -is between the two dates specified by the -.IR \-f +.Ar date +is between the dates specified by the +.Fl f and -.IR \-t -options, both of which default to the current minute. +.Fl t +options, both defaulting to the current minute. The dates should correspond to a unique minute in time. The format for -.IR date +.Ar date can be specified with the same syntax as for -.IR date (1). +.Xr date 1 . -.SH OPTIONS - -.TP -.B \-d +The options are as follows: +.Bl -tag -width Ds +.It Fl d print the default date format and exit. - -.TP -.BI \-f " [date]" +.It Fl f Op Ar date initial date for the range (default: current minute). If -.I date -is not specified then there will be no lower bound for the dates. - -.TP -.BI \-s " string" +.Ar date +is not specified there will be no lower bound for the dates. +.It Fl s Ar string change the string that separates the date from the text in the output lines (deafult: "\t"). - -.TP -.BI \-t " [date]" +.It Fl t Op Ar date final date for the range (default: current minute). If -.I date +.Ar date is not specified then there will be no upper bound for the dates. - -.TP -.B \-v +.It Fl v print version information and exit. - -.TP -.BI \-w " format" +.It Fl w Ar format change the format in which the date is written in the output lines. -.SH EXAMPLES +.Sh EXAMPLES If -.I events.txt +.Ar events.txt contains lines formatted as -.I "date text" +.Ar "date text" then -sdep -f +.Sh AUTHORS +.An Sebastiano Tronto Aq Mt sebastiano.tronto@gmail.com -.SH SOURCE CODE -Source code is available at https://github.com/sebastianotronto/sdep +.Sh SOURCE CODE +Source code is available at +.Lk https://github.com/sebastianotronto/sdep -.SH SEE ALSO -.IR date (1), -.IR strftime (3), -.IR strptime (3) +.Sh SEE ALSO +.Xr date 1 , +.Xr strftime 3 , +.Xr strptime 3 -- cgit v1.3