You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
konversation/konversation/src/konversation-0.19-colors.pl

24 lines
413 B

#! /usr/bin/perl
use strict;
my $currentGroup = "";
my $key;
my $value;
while (<>)
{
chomp;
if ( /^\[/ )
{
$currentGroup = $_;
next;
}
($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/);
if ($value =~ /([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/)
{
print("# DELETE $currentGroup$key\n");
printf("$key=%d,%d,%d\n",hex($1),hex($2),hex($3));
}
}