Skip to content
Snippets Groups Projects
Commit bccb2280 authored by taggart's avatar taggart
Browse files

add a CSV output format for importing into spreadsheets

parent e3baa10e
Branches
No related tags found
No related merge requests found
#!/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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment