3 # Show all projects ctags using the gitweb cache
4 # Use "show-tags.pl | sort -k2,2nr -k1,1f" to see in tag count order
13 my $gwic = $Girocco::Config
::projlist_cache_dir
. "/gitweb.index.cache";
15 eval { $cache = retrieve
($gwic); 1; } or die "Could not load cache file $gwic\n";
18 # [ "format string", [[project hash refs in project name order], {project name => hashref}]]
20 # Each project hash ref has:
21 # owner => project owner name
22 # descr_long => project one liner description (from description file)
23 # age_epoch => time of last change (seconds since epoch)
24 # ctags => hash ref of tag => count (not present if ctags not enabled)
25 # path => $Girocco::Config::reporoot relative path to repository
26 # descr => truncated version of descr_long (typically 29-34 characters)
30 foreach my $proj (@
{$cache->[1][0]}) {
31 ref($proj) eq 'HASH' && ref($proj->{ctags
}) eq 'HASH' or next;
32 while (my ($k,$v) = each(%{$proj->{ctags
}})) {
33 $v =~ /^\d+$/ && $v or $v = 1;
38 foreach my $tag (sort({lc($a) cmp lc($b) || $a cmp $b} keys(%ctags))) {
39 printf "%s\t%s\n", $tag, $ctags{$tag};