Browse Source

Add ttail manpage

Yann Weber 7 years ago
parent
commit
2f1458f3f3
2 changed files with 157 additions and 5 deletions
  1. 157
    0
      src/include/doxygen.h
  2. 0
    5
      src/main.c

+ 157
- 0
src/include/doxygen.h View File

@@ -0,0 +1,157 @@
1
+/**@page ttail
2
+ *@brief timed tail for logfiles
3
+ *@section SYNOSPIS
4
+ *ttail [OPTION]... [FILE]...
5
+ *@section DESCRIPTION
6
+ *Display loglines given a minimum date and/or a maximum date.
7
+ *
8
+ *@par -d --date-min=DATE
9
+ *Start to output loglines starting from this date
10
+ *@par -m --date-max=DATE
11
+ *Stop to output loglines starting from this date
12
+ *@par -f --date-format=FMT
13
+ *The date format present in the logfiles and used by -d --date-min and
14
+ *-m --date-max options (see @ref datefmt for more details)
15
+ *@par -p --prefix-len
16
+ *Set a constant prefix len to drop for each logline
17
+ *@par -r --re-prefix=REGEX
18
+ *Drop matching prefix for each logline
19
+ *@par -E --re-extended 
20
+ *Interpret -r --re-prefix as an extended regular expression (specified by 
21
+ *POSIX)
22
+ *@par -I --re-ignore-cas
23
+ *Ignore case for -r --re-prefix option (specified by POSIX)
24
+ *@par -v[v[v[...]]]
25
+ *Augment the loglevel
26
+ *
27
+ *@section datefmt Date format
28
+ * The dateformat understood by ttail is the strptime date format :
29
+ *
30
+ * The supported input field descriptors are listed below.  In case a text string (such as the name
31
+ * of a day of the week or a month name) is to be matched, the comparison is case insensitive.   In
32
+ * case a number is to be matched, leading zeros are permitted but not required.
33
+ * 
34
+ * \%%     The % character.
35
+ * 
36
+ * \%a or %A
37
+ * The  name  of the day of the week according to the current locale, in abbreviated form or
38
+ * the full name.
39
+ * 
40
+ * \%b or %B or %h
41
+ * The month name according to the current locale, in abbreviated form or the full name.
42
+ * 
43
+ * \%c     The date and time representation for the current locale.
44
+ * 
45
+ * \%C     The century number (0-99).
46
+ * 
47
+ * \%d or %e
48
+ * The day of month (1-31).
49
+ * 
50
+ * \%D     Equivalent to %m/%d/%y.  (This is the American style date, very confusing  to  non-Ameri‐
51
+ * cans,  especially  since %d/%m/%y is widely used in Europe.  The ISO 8601 standard format
52
+ * is %Y-%m-%d.)
53
+ * 
54
+ * \%H     The hour (0-23).
55
+ * 
56
+ * \%I     The hour on a 12-hour clock (1-12).
57
+ * 
58
+ * \%j     The day number in the year (1-366).
59
+ * 
60
+ * \%m     The month number (1-12).
61
+ * 
62
+ * \%M     The minute (0-59).
63
+ * 
64
+ * \%n     Arbitrary whitespace.
65
+ * 
66
+ * \%p     The locale's equivalent of AM or PM.  (Note: there may be none.)
67
+ * 
68
+ * \%r     The 12-hour clock time (using the locale's AM or PM).  In the POSIX locale equivalent  to
69
+ * \%I:%M:%S  %p.  If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the
70
+ * behavior is undefined.
71
+ * 
72
+ * \%R     Equivalent to %H:%M.
73
+ * 
74
+ * \%S     The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed).
75
+ * 
76
+ * \%t     Arbitrary whitespace.
77
+ * 
78
+ * \%T     Equivalent to %H:%M:%S.
79
+ * 
80
+ * \%U     The week number with Sunday the first day of the week (0-53).  The first Sunday of  Janu‐
81
+ * ary is the first day of week 1.
82
+ * 
83
+ * \%w     The ordinal number of the day of the week (0-6), with Sunday = 0.
84
+ * 
85
+ * \%W     The  week number with Monday the first day of the week (0-53).  The first Monday of Janu‐
86
+ * ary is the first day of week 1.
87
+ * 
88
+ * \%x     The date, using the locale's date format.
89
+ * 
90
+ * \%X     The time, using the locale's time format.
91
+ * 
92
+ * \%y     The year within century (0-99).  When a century is not otherwise specified, values in the
93
+ * range  69-99  refer  to  years  in the twentieth century (1969-1999); values in the range
94
+ * 00-68 refer to years in the twenty-first century (2000-2068).
95
+ * 
96
+ * \%Y     The year, including century (for example, 1991).
97
+ * 
98
+ * Some field descriptors can be modified by the E or O modifier characters  to  indicate  that  an
99
+ * alternative  format or specification should be used.  If the alternative format or specification
100
+ * does not exist in the current locale, the unmodified field descriptor is used.
101
+ * 
102
+ * 
103
+ * The E modifier specifies that the input string may contain alternative locale-dependent versions
104
+ * of the date and time representation:
105
+ * 
106
+ * \%Ec    The locale's alternative date and time representation.
107
+ * 
108
+ * \%EC    The name of the base year (period) in the locale's alternative representation.
109
+ * 
110
+ * \%Ex    The locale's alternative date representation.
111
+ * 
112
+ * \%EX    The locale's alternative time representation.
113
+ * 
114
+ * \%Ey    The offset from %EC (year only) in the locale's alternative representation.
115
+ * 
116
+ * \%EY    The full alternative year representation.
117
+ * 
118
+ * The O modifier specifies that the numerical input may be in an alternative locale-dependent for‐
119
+ * mat:
120
+ * 
121
+ * \%Od or %Oe
122
+ * The day of the month using the locale's alternative numeric symbols;  leading  zeros  are
123
+ * permitted but not required.
124
+ * 
125
+ * \%OH    The hour (24-hour clock) using the locale's alternative numeric symbols.
126
+ * 
127
+ * \%OI    The hour (12-hour clock) using the locale's alternative numeric symbols.
128
+ * 
129
+ * \%Om    The month using the locale's alternative numeric symbols.
130
+ * 
131
+ * \%OM    The minutes using the locale's alternative numeric symbols.
132
+ * 
133
+ * \%OS    The seconds using the locale's alternative numeric symbols.
134
+ * 
135
+ * \%OU    The  week  number  of  the  year (Sunday as the first day of the week) using the locale's
136
+ * alternative numeric symbols.
137
+ * 
138
+ * \%Ow    The ordinal number of the day of the week (Sunday=0),
139
+ * using the locale's alternative numeric symbols.
140
+ * 
141
+ * \%OW    The week number of the year (Monday as the first day of  the  week)  using  the  locale's
142
+ * alternative numeric symbols.
143
+ * 
144
+ * \%Oy    The year (offset from %C) using the locale's alternative numeric symbols.
145
+ *
146
+ *@section known_limits Known limitations
147
+ *Loglines has to be sorted.
148
+ *
149
+ *@section AUTHOR
150
+ *Written by Yann Weber <yann.weber@members.fsf.org>
151
+ */
152
+
153
+/**@mainpage
154
+ *
155
+ *Super options : -d -r -p -v -m
156
+ */
157
+

+ 0
- 5
src/main.c View File

@@ -1,11 +1,6 @@
1 1
 #include "include/ttail.h"
2 2
 #include "include/ttail_init.h"
3 3
 
4
-/**@mainpage
5
- *
6
- *Super options : -d -r -p -v -m
7
- */
8
-
9 4
 int main(int argc, char **argv)
10 5
 {
11 6
 	int res;

Loading…
Cancel
Save