diff --git a/tools/stats/topvolume b/tools/stats/topvolume index f0e330aa86d7c28c98ebf47a7ff434ca4be24a6f..115eb137a6949b85de23fe9a615641d1ec3fb3eb 100755 --- a/tools/stats/topvolume +++ b/tools/stats/topvolume @@ -1,5 +1,5 @@ #!/usr/bin/perl -# toplists - top $num lists and their volume / size, sorted descending by volume +# topvolume - top $num lists and their volume/size, sorted descending by volume # NOTE: this script requires the current user has read access to the db and arc/ $num=25; @@ -25,6 +25,11 @@ format Plain = $volume, $subscribers, $list, $lang . +format CSV = +@*,@*,@*,@* +$volume, $subscribers, $list, $lang +. + format Html = <tr><td><a href="https://lists.riseup.net/www/info/@*">@*</a></td><td align=right><a href=https://lists.riseup.net/www/arc/">@*</a></td><td><a href=https://lists.riseup.net/www/review/">@*</a></td><td>@*</td></tr> $list, $list, $list, $volume, $list, $subscribers, $lang @@ -49,6 +54,9 @@ if ( $ARGV[0] eq '-w' ) { print "<tr><th align=center>List name</th><th align=center>Volume</th><th>Subscribers</th></tr>\n"; } elsif ($ARGV[0] eq '-r' ) { $~='Pcre'; +} elsif ($ARGV[0] eq '-c' ) { + print "Volume,Subscribers,List name,Lang\n"; + $~='CSV'; } else { $~='Plain'; print "Top $num lists by monthly volume\n";