NAME

App::KGB::Painter -- add color to KGB notifications

DESCRIPTION

App::KGB::Painter is a simple class encapsulating coloring of KGB messages.

CONSTRUCTOR

new

my $p = App::KGB::Painter->new({ color_codes => { ... }, style => { ... } } );

color_codes is a hash with the special symbols interpreted as coloring commands by IRC clients.

style is another hash describing what colors to apply to different parts of the messages.

METHODS

colorize category text

Applies the colors of the style category to the given text.

colorize_change change

Given a change, applies colors to its files depending on the type of the change -- update, addition, deletion or property change.

COPYRIGHT & LICENSE

Copyright (c) Damyan Ivanov <dmn@debian.org>.

This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.