/[ddp]/manuals/trunk/count-langs.pl
ViewVC logotype

Contents of /manuals/trunk/count-langs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3684 - (show annotations) (download)
Fri Feb 17 00:17:17 2006 UTC (7 years, 3 months ago) by jfs
File MIME type: text/plain
File size: 734 byte(s)
Script to list translated documents
1 #!/usr/bin/perl -w
2 #
3 # "Count" languages for which a translation is available in the DDP
4 # useful for presentations :-)
5 #
6 # (c) 2006 Javier Fernandez-Sanguino, jfs@debian.org
7 #
8 # This code is distributed under the GNU GPL version 2
9 #
10 open (LIST,'find . -name "*.??.sgml" -o -name "*.??_??.sgml" |') or die ("Cannot execute: $?");
11 while (<LIST>) {
12 chomp;
13 $langs{$1} ++ if /.*?\.(\w{2}|\w{2}_\w{2})\.sgml/;
14 }
15 close LIST;
16 open (LIST,'find . -type d -name "??" -o -name "??_??" |') or die ("Cannot execute: $?");
17 while (<LIST>) {
18 chomp;
19 $langs{$1} ++ if /^\.\/(\w+)\/(\w{2}|\w{2}_\w{2})$/;
20 }
21 close LIST;
22
23
24 foreach $lang (sort { $langs{$b} <=> $langs{$a} } keys %langs) {
25 print $lang." ";
26 print "+"x$langs{$lang};
27 print "\n";
28 }
29

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5