mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-21 13:03:31 -04:00
sys-apps/colortail: new package, add 0.3.3, 9999
Signed-off-by: Aidan Harris <me@aidanharr.is>
This commit is contained in:
46
sys-apps/colortail/files/01_colorize_default.patch
Normal file
46
sys-apps/colortail/files/01_colorize_default.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
Patch to use /etc/colortail/conf.colortail by default to colorizer
|
||||
without the option -k
|
||||
Index: colortail-0.3.2/ColorTail.cc
|
||||
===================================================================
|
||||
--- colortail-0.3.2.orig/ColorTail.cc 2010-01-02 13:13:03.000000000 -0500
|
||||
+++ colortail-0.3.2/ColorTail.cc 2010-01-02 13:17:31.000000000 -0500
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+#include <stdio.h>
|
||||
|
||||
#include "ColorTail.h"
|
||||
#include "TailFile.h"
|
||||
@@ -102,9 +104,14 @@
|
||||
{
|
||||
// no config file
|
||||
// print error
|
||||
- cout << "colortail: Couldn't open global color config file. Skipping colors for the " << argv[i] << " file." << endl;
|
||||
+ //cout << "colortail: Couldn't open global color config file. Skipping colors for the " << argv[i] << " file." << endl;
|
||||
// open the tailfile without colorizer
|
||||
- new_tailfile->open(argv[i], NULL);
|
||||
+ //new_tailfile->open(argv[i], NULL);
|
||||
+ string cade = "/etc/colortail/conf.colortail";
|
||||
+ char* ccade = new char[cade.length()+1];
|
||||
+ strcpy(ccade, cade.c_str());
|
||||
+ colorizer = new Colorizer(ccade);
|
||||
+ new_tailfile->open(argv[i], colorizer);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -126,7 +133,12 @@
|
||||
// no config file
|
||||
// no error message because it can be cfgfile1,,cfgfile2
|
||||
// open the tailfile without colorizer
|
||||
- new_tailfile->open(argv[i], NULL);
|
||||
+ //new_tailfile->open(argv[i], NULL);
|
||||
+ string cade = "/etc/colortail/conf.colortail";
|
||||
+ char* ccade = new char[cade.length()+1];
|
||||
+ strcpy(ccade, cade.c_str());
|
||||
+ colorizer = new Colorizer(ccade);
|
||||
+ new_tailfile->open(argv[i], colorizer);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
sys-apps/colortail/files/02_adding_option.patch
Normal file
13
sys-apps/colortail/files/02_adding_option.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Patch to show the option -l to display without colors.
|
||||
Index: colortail-0.3.2/Usage.cc
|
||||
===================================================================
|
||||
--- colortail-0.3.2.orig/Usage.cc 2010-01-02 13:22:27.000000000 -0500
|
||||
+++ colortail-0.3.2/Usage.cc 2010-01-02 13:24:43.000000000 -0500
|
||||
@@ -46,6 +46,7 @@
|
||||
cout << "\t\t\t\tIf only one config file it's global otherwise" << endl;
|
||||
cout << "\t\t\t\tone config file for each tail file" << endl;
|
||||
cout << " -n, --lines=N\t\t\toutput the last N lines, instead of last 10" << endl;
|
||||
+ cout << " -l \t\t\t\tdisplay without colors" << endl;
|
||||
cout << " -q, --quiet, --silent\t\tnever output headers giving file names" << endl;
|
||||
cout << " -v, --version\t\t\toutput version information and exit" << endl;
|
||||
cout << endl;
|
||||
64
sys-apps/colortail/files/colortail.1
Normal file
64
sys-apps/colortail/files/colortail.1
Normal file
@@ -0,0 +1,64 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH COLORTAIL 1 "January 2, 2010"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
colortail \- log colorizer that makes log checking easier
|
||||
.SH SYNOPSIS
|
||||
.B colortail
|
||||
.RI [ options ] [file...]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B colortail
|
||||
commands.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBcolortail\fP is basically tail but with support for colors. With the help of color
|
||||
config files you define what part of the output to print in which color.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Show summary of options.
|
||||
.TP
|
||||
.B \-f, \-\-follow
|
||||
Output appended data as the file grows.
|
||||
.TP
|
||||
.B \-k, \-\-config=file
|
||||
.B \-\-config=file1,file2,...
|
||||
Color config files for the tail files. If only one config file it's global
|
||||
otherwise one config file for each tail file.
|
||||
.TP
|
||||
.B \-n, \-\-lines=N
|
||||
Output the last N lines, instead of last 10.
|
||||
.TP
|
||||
.B \-l
|
||||
Display without colors.
|
||||
.TP
|
||||
.B \-q, \-\-quiet, \-\-silent
|
||||
Never output headers giving file names.
|
||||
.TP
|
||||
.B \-v, \-\-version
|
||||
Output version information and exit.
|
||||
.TP
|
||||
.br
|
||||
.SH AUTHOR
|
||||
colortail was written by Joakim Andersson <ja@joakimandersson.se> Copyright (C) 2009
|
||||
.PP
|
||||
This manual page was written by Elías Alejandro Año Mendoza <ealmdz@gmail.com>,
|
||||
for the Debian project (and may be used by others).
|
||||
Reference in New Issue
Block a user