Remove link to GitHub sponsors
[openssl-web.git] / bin / mk-notes
1 #! /usr/bin/perl -w
2 use strict;
3
4 my $SERIES = shift @ARGV;
5 die "Missing series argument" if (! $SERIES);
6
7 my $copy = 0;
8 my $in_ul = 0;
9 while ( <STDIN> ) {
10     chomp;
11     if (/^\s*(Major changes between|Known issues in).*(\d+\.\d+\.\d+)\D.*\[(.*)\]:?$/) {
12         my $release_series = $2;
13         my $release_date = $3;
14         if ($release_date !~ /^in pre-release|\d+\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d+$/) {
15             # The rationale to not simply stop when encountering another title
16             # line is that it's unreleased stuff that also exist in another
17             # series, but is also part of this one and should therefore be
18             # included.
19             next;
20         }
21         if ($in_ul) {
22             print "</ul>\n";
23             $in_ul = 0;
24         }
25         if ($release_series eq $SERIES) {
26             print "<h3>";
27             print;
28             print "</h3>\n";
29             $copy = 1;
30             next;
31         } elsif ($copy) {
32             last;
33         }
34     }
35     if ($copy) {
36         # HTML entities.
37         s|&|&amp;|sg;
38         s|<|&lt;|sg;
39         s|>|&gt;|sg;
40         if (s/^\s+o\s+/<li>/ && !$in_ul) {
41             print "<ul>\n";
42             $in_ul = 1;
43         }
44         s/CVE-(\d{4}-\d{4})/<a href=vulnerabilities.html#$1>CVE-$1<\/a>/g;
45         print;
46     }
47 }
48 if ($in_ul) {
49     print "</ul>\n";
50     $in_ul = 0;
51 }