diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /reporting/templates/maintainers.tmpl | |
parent | Initial commit. (diff) | |
download | lintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'reporting/templates/maintainers.tmpl')
-rw-r--r-- | reporting/templates/maintainers.tmpl | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/reporting/templates/maintainers.tmpl b/reporting/templates/maintainers.tmpl new file mode 100644 index 0000000..58a9626 --- /dev/null +++ b/reporting/templates/maintainers.tmpl @@ -0,0 +1,57 @@ +{ head("Lintian Reports by Maintainer") } + <h1>Maintainers</h1> + + <p> + Maintainers are listed sorted case-insensitively by package maintainer + string. This is an unsophisticated sort that does not take into + account any national collating sequence, only Unicode strings, so + maintainers whose names start with non-ASCII characters will sort at + the end of this page. + </p> + + <p> + Jump to: { join (' ', (map { qq(<a href="#$_">$_</a>) } 'A'..'Z', 'Other')) } +{ + # !!NB!! We are deliberately leaving out the closing "</p>" here. + # It will be added by the loop below, which can (due to this) + # unconditionally emit a "</p>" at the start of each new letter. + + # Put headings before each new initial letter and add anchors, except + # for non-ASCII initial characters. For those, since we can't be + # assured we'll get combining characters right, just accumulate them + # under a heading of Other. + my $letter = ''; + my @order = sort { + my $la = lc($a); + my $lb = lc($b); + # Ensure non-ASCII characters get push to the back + if ($la lt 'a' and $lb ge 'a') { + 1; + } elsif ($la ge 'a' and $lb lt 'a') { + -1; + } else { + $la cmp $lb; + } + } keys(%maintainers); + for my $key (@order) { + my $maint_data = $maintainers{$key}; + my $url = $maint_data->{url}; + my $maintainer = $maint_data->{name}; + my $first = uc substr($key, 0, 1); + if ($first lt 'A' || $first gt 'Z') { + $first = 'Other'; + } + if ($first ne $letter) { + $letter = $first; + if ($letter eq 'Other') { + $OUT .= qq( </p>\n\n <h2 id="Other">Other</h2>\n\n <p>\n); + } else { + $OUT .= qq( </p>\n\n <h2 id="$letter"><a id="$letter">) + . $letter . "</a></h2>\n\n <p>\n"; + } + } + $OUT .= qq( <a href="${path_prefix}maintainer/$url">$maintainer</a>) + . qq{ (<a href="${path_prefix}full/$url">full report</a>)<br />\n}; + } +} </p> +{ foot() } |