Add manpage to git repo

This commit is contained in:
Yann Weber 2017-05-15 14:17:00 +02:00
commit 491de41e54
3 changed files with 171 additions and 3 deletions

2
.gitignore vendored
View file

@ -21,4 +21,4 @@ tests/*.log
tests/*.trs
tests/Makefile*
docs/html
docs/man
docs/man/man3

View file

@ -1,7 +1,7 @@
dist_man_MANS= $(top_srcdir)/docs/man/man1/ttail.1
if HAVE_DOXYGEN
CLEANFILES = doxyfile.stamp
directory = $(top_srcdir)/docs/man/man3/
dist_man_MANS= $(top_srcdir)/docs/man/man1/ttail.1
$(directory)/man_page_1.3: doxyfile.stamp
$(directory)/man_page_2.3: doxyfile.stamp
@ -19,5 +19,5 @@ $(top_srcdir)/docs/man/man1/ttail.1: doxyfile.stamp
sed -i 's/^.TH "ttail" 3/.TH "ttail" 1/' $(top_srcdir)/docs/man/man1/ttail.1
clean-local:
-rm -rf $(top_srcdir)/docs/html $(top_srcdir)/docs/man $(top_srcdir)/docs/doxygen_sqlite3.db
-rm -rf $(top_srcdir)/docs/html $(top_srcdir)/docs/man/man3 $(top_srcdir)/docs/doxygen_sqlite3.db
endif

168
docs/man/man1/ttail.1 Normal file
View file

@ -0,0 +1,168 @@
.TH "ttail" 1 "Mon May 15 2017" "Version 0.0.1" "ttail" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ttail \- timed tail for logfiles
.SH "SYNOSPIS"
.PP
ttail [OPTION]\&.\&.\&. [FILE]\&.\&.\&.
.SH "DESCRIPTION"
.PP
Display loglines given a minimum date and/or a maximum date\&.
.PP
\fB-d --date-min=DATE\fP
.RS 4
Start to output loglines starting from this date
.RE
.PP
\fB-m --date-max=DATE\fP
.RS 4
Stop to output loglines starting from this date
.RE
.PP
\fB-f --date-format=FMT\fP
.RS 4
The date format present in the logfiles and used by -d --date-min and -m --date-max options (see \fBDate formats\fP for more details)
.RE
.PP
\fB-p --prefix-len\fP
.RS 4
Set a constant prefix len to drop for each logline
.RE
.PP
\fB-r --re-prefix=REGEX\fP
.RS 4
Drop matching prefix for each logline
.RE
.PP
\fB-E --re-extended \fP
.RS 4
Interpret -r --re-prefix as an extended regular expression (specified by POSIX)
.RE
.PP
\fB-I --re-ignore-cas\fP
.RS 4
Ignore case for -r --re-prefix option (specified by POSIX)
.RE
.PP
\fB-v[v[v[\&.\&.\&.]]]\fP
.RS 4
Augment the loglevel
.RE
.PP
.SH "Date formats"
.PP
ttail understand two date formats : strprtime and relative
.SS "Relative date format"
Relative date format is used with -d --date-min or -m --date-max arguments\&. The shape of a relative date is '-#[VAL][UNIT]' with VAL an integer and UNIT one of the recognized units :
.IP "\(bu" 2
y[ear]
.IP "\(bu" 2
M[onth]
.IP "\(bu" 2
d[ay]
.IP "\(bu" 2
h[our]
.IP "\(bu" 2
m[in]
.IP "\(bu" 2
s[ec]
.PP
.SS "Strptime date format"
The supported input field descriptors are listed below\&. In case a text string (such as the name of a day of the week or a month name) is to be matched, the comparison is case insensitive\&. In case a number is to be matched, leading zeros are permitted but not required\&.
.PP
%% The % character\&.
.PP
%a or A The name of the day of the week according to the current locale, in abbreviated form or the full name\&.
.PP
%b or B or h The month name according to the current locale, in abbreviated form or the full name\&.
.PP
%c The date and time representation for the current locale\&.
.PP
%C The century number (0-99)\&.
.PP
%d or e The day of month (1-31)\&.
.PP
%D Equivalent to m/d/y\&. (This is the American style date, very confusing to non-Ameri cans, especially since d/m/y is widely used in Europe\&. The ISO 8601 standard format is Y-m-d\&.)
.PP
%H The hour (0-23)\&.
.PP
%I The hour on a 12-hour clock (1-12)\&.
.PP
%j The day number in the year (1-366)\&.
.PP
%m The month number (1-12)\&.
.PP
%M The minute (0-59)\&.
.PP
%n Arbitrary whitespace\&.
.PP
%p The locale's equivalent of AM or PM\&. (Note: there may be none\&.)
.PP
%r The 12-hour clock time (using the locale's AM or PM)\&. In the POSIX locale equivalent to %I:M:S p\&. If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the behavior is undefined\&.
.PP
%R Equivalent to H:M\&.
.PP
%S The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed)\&.
.PP
%t Arbitrary whitespace\&.
.PP
%T Equivalent to H:M:S\&.
.PP
%U The week number with Sunday the first day of the week (0-53)\&. The first Sunday of Janu ary is the first day of week 1\&.
.PP
%w The ordinal number of the day of the week (0-6), with Sunday = 0\&.
.PP
%W The week number with Monday the first day of the week (0-53)\&. The first Monday of Janu ary is the first day of week 1\&.
.PP
%x The date, using the locale's date format\&.
.PP
%X The time, using the locale's time format\&.
.PP
%y The year within century (0-99)\&. When a century is not otherwise specified, values in the range 69-99 refer to years in the twentieth century (1969-1999); values in the range 00-68 refer to years in the twenty-first century (2000-2068)\&.
.PP
%Y The year, including century (for example, 1991)\&.
.PP
Some field descriptors can be modified by the E or O modifier characters to indicate that an alternative format or specification should be used\&. If the alternative format or specification does not exist in the current locale, the unmodified field descriptor is used\&.
.PP
The E modifier specifies that the input string may contain alternative locale-dependent versions of the date and time representation:
.PP
%Ec The locale's alternative date and time representation\&.
.PP
%EC The name of the base year (period) in the locale's alternative representation\&.
.PP
%Ex The locale's alternative date representation\&.
.PP
%EX The locale's alternative time representation\&.
.PP
%Ey The offset from EC (year only) in the locale's alternative representation\&.
.PP
%EY The full alternative year representation\&.
.PP
The O modifier specifies that the numerical input may be in an alternative locale-dependent for mat:
.PP
%Od or Oe The day of the month using the locale's alternative numeric symbols; leading zeros are permitted but not required\&.
.PP
%OH The hour (24-hour clock) using the locale's alternative numeric symbols\&.
.PP
%OI The hour (12-hour clock) using the locale's alternative numeric symbols\&.
.PP
%Om The month using the locale's alternative numeric symbols\&.
.PP
%OM The minutes using the locale's alternative numeric symbols\&.
.PP
%OS The seconds using the locale's alternative numeric symbols\&.
.PP
%OU The week number of the year (Sunday as the first day of the week) using the locale's alternative numeric symbols\&.
.PP
%Ow The ordinal number of the day of the week (Sunday=0), using the locale's alternative numeric symbols\&.
.PP
%OW The week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols\&.
.PP
%Oy The year (offset from C) using the locale's alternative numeric symbols\&.
.SH "Known limitations"
.PP
Loglines has to be sorted\&.
.SH "AUTHOR"
.PP
Written by Yann Weber yann.weber@members.fsf.org