33 |
|
|
34 |
my $path; # this is name of database |
my $path; # this is name of database |
35 |
|
|
36 |
Text::Iconv->raise_error(1); # Conversion errors raise exceptions |
Text::Iconv->raise_error(0); # Conversion errors don't raise exceptions |
37 |
|
|
38 |
# this is encoding of all files on disk, including import_xml/*.xml file and |
# this is encoding of all files on disk, including import_xml/*.xml file and |
39 |
# filter/*.pm files! It will be used to store strings in perl internally! |
# filter/*.pm files! It will be used to store strings in perl internally! |
247 |
sub progress { |
sub progress { |
248 |
#return if (! $opts{q}); # FIXME |
#return if (! $opts{q}); # FIXME |
249 |
my $current = shift; |
my $current = shift; |
250 |
my $total = shift; |
my $total = shift || 1; |
251 |
my $p = int($current * 100 / $total); |
my $p = int($current * 100 / $total); |
252 |
if ($p != $last_p) { |
if ($p != $last_p) { |
253 |
printf STDERR ("%5d / %5d [%-51s] %-2d %% \r",$current,$total,"=" x ($p/2).">", $p ); |
printf STDERR ("%5d / %5d [%-51s] %-2d %% \r",$current,$total,"=" x ($p/2).">", $p ); |