aboutsummaryrefslogtreecommitdiff
path: root/sdep.1
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-05-08 19:19:41 +0200
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-05-08 19:19:41 +0200
commit82bcfe3f25b1f0c08c93fd35497019b546e24ce2 (patch)
tree055309330ff16f6d3f754b2ef6eaff92fe3925ed /sdep.1
parent61d15dd4854fe4607442b87602448d6dee16b6a8 (diff)
downloadsdep-82bcfe3f25b1f0c08c93fd35497019b546e24ce2.tar.gz
sdep-82bcfe3f25b1f0c08c93fd35497019b546e24ce2.zip
First commit, v0.1
Diffstat (limited to '')
-rw-r--r--sdep.1106
1 files changed, 106 insertions, 0 deletions
diff --git a/sdep.1 b/sdep.1
new file mode 100644
index 0000000..8cbdd24
--- /dev/null
+++ b/sdep.1
@@ -0,0 +1,106 @@
1.TH SDEP 1 sdep\-VERSION
2
3.SH NAME
4sdep \- a simple "date+event" line parser
5
6.SH SYNOPSIS
7.B sdep
8.RB [ \-dv ]
9.IR "[+format]"
10.RB [ \-f
11.IR "[date]" ]
12.RB [ \-t
13.IR "[date]" ]
14.RB [ \-w
15.IR format ]
16.RB [ \-s
17.IR string ]
18
19.SH DESCRIPTION
20.B sdep
21reads lines of the form
22
23.IR "date text"
24
25from stdin and writes to stdout those lines such that
26.IR date
27is between the two dates specified by the
28.IR \-f
29and
30.IR \-t
31options, both of which default to the current minute.
32The dates should correspond to a unique minute in time. The format for
33.IR date
34can be specified with the same syntax as for
35.IR date (1).
36
37.SH OPTIONS
38
39.TP
40.B \-d
41print the default date format and exit.
42
43.TP
44.BI \-f " [date]"
45initial date for the range (default: current minute). If
46.I date
47is not specified then there will be no lower bound for the dates.
48
49.TP
50.BI \-s " string"
51change the string that separates the date from the text in the output
52lines (deafult: "\t").
53
54.TP
55.BI \-t " [date]"
56final date for the range (default: current minute). If
57.I date
58is not specified then there will be no upper bound for the dates.
59
60.TP
61.B \-v
62print version information and exit.
63
64.TP
65.BI \-w " format"
66change the format in which the date is written in the output lines.
67
68.SH EXAMPLES
69If
70.I events.txt
71contains lines formatted as
72.I "date text"
73then
74
75sdep -f <events.txt
76
77will print all the lines whose date is in the past, while
78
79sdep -t -w "%A" <events.txt
80
81will print all lines whose date is in the future, showing only the day of the
82week and the text.
83
84sdep -f "1999-01-01 00:00" -t "1999-12-31 23:59" -w "" <events.txt
85
86will show only the
87.I text
88of all lines with a date in 1999. You can specify a different format for the
89dates, for example
90
91sdep +"%m/%d/%Y %I:%M%p" -t "12/31/2020 11:59pm" -w "" <events.txt
92
93will match all dates from December 31st, 2020, one minute before midnight
94(included). Note: this only works if your locale has an am/pm format, see
95.IR date (1).
96
97.SH AUTHORS
98Sebastiano Tronto <sebastiano.tronto@gmail.com>
99
100.SH SOURCE CODE
101Source code is available at https://github.com/sebastianotronto/sdep
102
103.SH SEE ALSO
104.IR date (1),
105.IR strftime (3),
106.IR strptime (3)

Generated with cgit - Back to sebastiano.tronto.net