aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 1520dfcd04378ee1a9ad8de2f07d0fd663c9a624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
generated by cgit v1.2.3 (git 2.39.1) at 2025-06-03 14:16:01 +0000
 


"w">    # Baseline day for the size data was Fri Oct 25 23:02:26 EDT 1996 
    $jdate -= 297;

    return($jdate);
}

open(NEWS, "NEWS");
$timestamp = `date`;
chop $timestamp;
$release = "unknown";
$lines = "unknown";
$date = "unknown";
$jdate = "unknown";
print <<EOF;
# Population data from fetchmail NEWS file, as of $timestamp.
#
# Output other than pass-through % lines is tab-separated fields.
# Field 1: release ID
# Field 2: count of source lines under version control 
# Field 3: count of fetchmail-friends subscribers
# Field 4: count of fetchmail-announce subscribers
# Field 5: total subscribers to both lists
# Field 6: date of release (days since first datum)
# Field 7: date of release (RFC822 date format)
#
EOF
while ($_ = <NEWS>)
{
    my($sum);

    if (/^%/) {
	print $_;
    }
    elsif (/^fetchmail-([^ ]*) \(([^)]+)\)(, [0-9]* lines)?:/) {
	$release = $1;
	$date = $2;
	$jdate = &day_offset($date);
	if ($3) {
	    $lines = substr($3, 2, length($3) - 8);
	} else {
	    $lines = 'na'
	}
    }
    elsif (/There are ([0-9]*) people on fetchmail-friends and ([0-9]*) on fetchmail-announce/) {
	$sum = $1 + $2;
	print "${release}\t${lines}\t$1\t$2\t${sum}\t${jdate}\t${date}\n";
	$release = "unknown";
	$date = "unknown";
    }
    elsif (/There are ([0-9]*) people on the fetchmail-friends list./) {
	print "$release\t${lines}\t$1\t0\t$1\t$jdate\t$date\n";
	$release = "unknown";
	$date = "unknown";
    }
}

# end