From a949b730e71ae036ab1759ff57ccbf18cd5c2f20 Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Mon, 7 May 2012 13:11:02 +0900 Subject: [PATCH] (split) LDP: Update untrans-list.pl. --- untrans-list.pl | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/untrans-list.pl b/untrans-list.pl index 6c169bd0..278a4d7b 100755 --- a/untrans-list.pl +++ b/untrans-list.pl @@ -1,14 +1,32 @@ #!/usr/bin/env perl -print < Translation status of LDP man-pages EOF +} + +sub print_footer { + print < + +EOF +} + +sub print_poname { + my $poname = shift; + printf("\n", $poname); +} $poname = ""; +$poname_print = 1; + +print_header(); while (<>) { if (/^po4a/) { @@ -17,8 +35,7 @@ while (<>) { @dat = split('/', $cfg); $poname = $dat[2]; $poname =~ s/\.cfg$//; - printf("\n", $poname); + $poname_print = 1; } next if ! /^Discard /; s/\(//; @@ -28,12 +45,13 @@ while (<>) { $comp = $dat[2]; $all = $dat[4]; $ratio = $comp/$all*100; + if ($poname_print) { + print_poname($poname); + $poname_print = 0; + } #printf("%s: %d/%d, %.2f\n", $page, $comp, $all, $comp/$all*100); printf("\n", $page, ($all - $comp), $all, $ratio); } -print < - -EOF +print_footer(); -- 2.11.0
page nameremainingcomp. %
" . + "%s
" . - "%s
%s%d/%d%.2f