diff options
author | Andy Shevchenko <andy@smile.org.ua> | 2006-09-05 05:07:47 +0000 |
---|---|---|
committer | Andy Shevchenko <andy@smile.org.ua> | 2006-09-05 05:07:47 +0000 |
commit | eecea3faee68010f90a79e75a85d79b5fb5a37a3 (patch) | |
tree | 5e34297915e2a57a2a5f757ee487e12eb4108620 | |
parent | 22de7865dea4af5d8e82ccc1ad8f8f32c15c2d53 (diff) | |
download | renrot-eecea3faee68010f90a79e75a85d79b5fb5a37a3.tar.gz renrot-eecea3faee68010f90a79e75a85d79b5fb5a37a3.tar.bz2 |
Remove --color. Add 'use color' to configuration file.
git-svn-id: file:///svnroot/renrot/trunk@258 fe2816f4-e837-0410-b10a-f608c9d244a1
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | TODO | 7 | ||||
-rw-r--r-- | etc/colors.conf | 3 | ||||
-rwxr-xr-x | renrot | 47 |
4 files changed, 23 insertions, 38 deletions
@@ -1,2 +1,5 @@ $Log$ +Revision 1.163 2006/09/05 05:07:47 andy +Remove --color. Add 'use color' to configuration file. + Revision 1.162 2006/09/02 18:29:20 andy @@ -640 +643,2 @@ Revision 1.1 2005/10/17 13:39:38 zeus ChangeLog file is added. Its the very begining. + @@ -9,2 +9,9 @@ q optional feature +BUGS + +- fix cleaning EXIFs when --no-backup is given + +- make possible to use same EXIF tags in different groups + + EXIF tags diff --git a/etc/colors.conf b/etc/colors.conf index 73297ce..2ac6e60 100644 --- a/etc/colors.conf +++ b/etc/colors.conf @@ -5,2 +5,5 @@ +# Use colorized output. This NOT works under Win32. +#Use color = No + # Setup colors for different facilities @@ -72,2 +72,3 @@ my %configOptions = ( 'trim' => 1, + 'use color' => 0, 'use ipc' => 0, @@ -86,3 +87,2 @@ my $aggrVirtDir; # directory name for virtual aggregation my $backup = 1; # make or not a backup of the original files -my %colorsFromCli; # colors are got from CLI my $comfile; # file with commentary @@ -205,3 +205,3 @@ sub printColored { - if (defined $useColor and $useColor != 0) { + if ($configOptions{'use color'} != 0) { if (defined $facility and defined $colors{$facility}) { @@ -219,3 +219,3 @@ sub procmsg { - if (defined $useColor and $useColor != 0) { + if ($configOptions{'use color'} != 0) { if (defined $colors{'process'}) { @@ -291,3 +291,2 @@ sub getOptions { my $showHelp = 0; # need help - my @tmpColors; my @tmpTags; @@ -301,3 +300,2 @@ sub getOptions { "backup!" => \$backup, - "color=s" => \@tmpColors, "comment-file=s" => \$comfile, @@ -342,3 +340,2 @@ sub getOptions { dbgmsg (3, " --backup: ", boolConv($backup), "\n"); - dbgmsg (3, " --color:\n", join("\n", @tmpColors), "\n") if (scalar(@tmpColors) > 0); dbgmsg (3, " --comment-file: $comfile\n") if (defined $comfile); @@ -397,10 +394,2 @@ sub getOptions { - # Convert multiple color parameters to colors hash - foreach my $colorStr (@tmpColors) { - my %color = strToHash($colorStr, 'reset'); - foreach my $key (keys %color) { - $colorsFromCli{$key} = $color{$key}; - } - } - # Convert multiple tag parameters to tags hash @@ -408,5 +397,3 @@ sub getOptions { my %tag = strToHash($tagStr); - foreach my $key (keys %tag) { - $tagsFromCli{$key} = $tag{$key}; - } + map { $tagsFromCli{$_} = $tag{$_} } keys %tag; } @@ -521,5 +508,3 @@ sub parseConfigFile { my %tmpConfig = getConfig($fc + 1, $file); - foreach my $key (keys %tmpConfig) { - $hConfig{$key} = $tmpConfig{$key}; - } + map { $hConfig{$_} = $tmpConfig{$_} } keys %tmpConfig; } @@ -595,4 +580,2 @@ sub dirValidator { sub switchColor { - dbgmsg (1, "Switch to user defined color scheme.\n"); - # Parse configuration file color set @@ -601,9 +584,6 @@ sub switchColor { my %color = strToHash($configOptions{$cKey}, 'reset'); - foreach my $key (keys %color) { - $colors{$key} = $color{$key}; - } + map { $colors{$_} = $color{$_} } keys %color; } - # Merge colors from configuration file with command line arguments - map { $colors{$_} = $colorsFromCli{$_} } keys %colorsFromCli; + dbgmsg (1, "Switch to user defined color scheme.\n"); } @@ -615,7 +595,4 @@ sub switchColor { -# parse command line options getOptions(); - parseConfig($configFile); - switchColor(); @@ -635,2 +612,3 @@ $configOptions{'name template'} = $nameTemplate if (defined $nameTemplate); $configOptions{'trim'} = $trim if (defined $trim); +$configOptions{'use color'} = $useColor if (defined $useColor); $configOptions{'use ipc'} = $useIPC if (defined $useIPC); @@ -712,5 +690,3 @@ $tags{'UserComment'} = {value => $userComment} if (defined $userComment); # Merge tags from configuration file with command line arguments -foreach my $key (keys %tagsFromCli) { - $tags{$key} = $tagsFromCli{$key}; -} +map { $tags{$_} = $tagsFromCli{$_} } keys %tagsFromCli; @@ -1408,3 +1384,2 @@ Colorizing options: --use-color (*) colorized output - --color <COLOR> ... setup color(s) @@ -1788,6 +1763,2 @@ colorized output. This NOT works under Win32. -=item B<--color> I<COLOR> - -setup color for choosen facility - =item B<--dry-run> |