aboutsummaryrefslogtreecommitdiff
path: root/sdep-0.2/sdep.1
diff options
context:
space:
mode:
Diffstat (limited to 'sdep-0.2/sdep.1')
-rw-r--r--sdep-0.2/sdep.194
1 files changed, 94 insertions, 0 deletions
diff --git a/sdep-0.2/sdep.1 b/sdep-0.2/sdep.1
new file mode 100644
index 0000000..302c45d
--- /dev/null
+++ b/sdep-0.2/sdep.1
@@ -0,0 +1,94 @@
1.Dd May 13, 2021
2.Dt SDEP 1
3.Os
4.Sh NAME
5.Nm sdep
6.Nd a simple "date+event" line parser
7
8.Sh SYNOPSIS
9.Nm
10.Op Fl dv
11.Op Ar +format
12.Op Fl f Op Ar date
13.Op Fl t Op Ar date
14.Op Fl w Ar format
15.Op Fl s Ar string
16
17.Sh DESCRIPTION
18.Nm
19reads lines of the form
20
21.Dl Ar "date text"
22
23from stdin and writes to stdout those lines such that
24.Ar date
25is between the dates specified by the
26.Fl f
27and
28.Fl t
29options, both defaulting to the current minute.
30The dates should correspond to a unique minute in time. The format for
31.Ar date
32can be specified with the same syntax as for
33.Xr date 1 .
34
35The options are as follows:
36.Bl -tag -width Ds
37.It Fl d
38print the default date format and exit.
39.It Fl f Op Ar date
40initial date for the range (default: current minute). If
41.Ar date
42is not specified there will be no lower bound for the dates.
43.It Fl s Ar string
44change the string that separates the date from the text in the output
45lines (deafult: "\t").
46.It Fl t Op Ar date
47final date for the range (default: current minute). If
48.Ar date
49is not specified then there will be no upper bound for the dates.
50.It Fl v
51print version information and exit.
52.It Fl w Ar format
53change the format in which the date is written in the output lines.
54
55.Sh EXAMPLES
56If
57.Ar events.txt
58contains lines formatted as
59.Ar "date text"
60then
61
62.Dl sdep -f <events.txt
63
64will print all the lines whose date is in the past, while
65
66.Dl sdep -t -w "%A" <events.txt
67
68will print all lines whose date is in the future, showing only the day of the
69week and the text.
70
71.Dl sdep -f "1999-01-01 00:00" -t "1999-12-31 23:59" -w "" <events.txt
72
73will show only the
74.Ar text
75of all lines with a date in 1999. You can specify a different format for the
76dates, for example
77
78.Dl sdep +"%m/%d/%Y %I:%M%p" -t "12/31/2020 11:59pm" -w "" <events.txt
79
80will match all dates from December 31st, 2020, one minute before midnight
81(included). Note: this only works if your locale has an am/pm format, see
82.Xr date 1 .
83
84.Sh AUTHORS
85.An Sebastiano Tronto Aq Mt sebastiano.tronto@gmail.com
86
87.Sh SOURCE CODE
88Source code is available at
89.Lk https://github.com/sebastianotronto/sdep
90
91.Sh SEE ALSO
92.Xr date 1 ,
93.Xr strftime 3 ,
94.Xr strptime 3

Generated with cgit - Back to sebastiano.tronto.net