![Gerald Combs](/assets/img/avatar_default.png)
Switch the AUTHORS heading markup from underscores to equals. This makes it easier to transform to Pod headings. Update the AUTHORS-SHORT-FORMAT output so that the author lists are verbatim paragraphs. Add a style for the author lists instead of wrapping everything in a <pre>. The AUTHORS files are UTF-8 and wireshark.pod sets "=encoding utf8". There's no need to translate characters. Change-Id: I43cf18ff86774421b08edb84d968a9410be177fe Reviewed-on: https://code.wireshark.org/review/29181 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
55 lines
1.1 KiB
Perl
Executable file
55 lines
1.1 KiB
Perl
Executable file
# Convert AUTHORS-SHORT file for use in man page and HTML documentation
|
|
# after processing through pod2man and pod2html.
|
|
#
|
|
# Must be called via perlnoutf.
|
|
#
|
|
# Copyright 2004 Graeme Hewson <ghewson@wormhole.me.uk>
|
|
#
|
|
# Wireshark - Network traffic analyzer
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
# Copyright 1998 Gerald Combs
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
#
|
|
|
|
use strict;
|
|
|
|
# This might not be necessary.
|
|
print "=for html <style>div#authors pre, div#authors pre code { white-space: pre-wrap; }</style>\n\n";
|
|
print "=for html <div id=authors>\n\n";
|
|
|
|
print "=for man .nf\n\n";
|
|
|
|
while (<>) {
|
|
printline();
|
|
}
|
|
|
|
print "\n=for html </div>\n";
|
|
print "\n=for man .fi\n";
|
|
|
|
sub printline {
|
|
my $line = shift || $_;
|
|
|
|
if ($line =~ /^=/) {
|
|
#
|
|
# Convert Asciidoctor-style headings to Pod.
|
|
#
|
|
$line =~ s/^= /=head2 /;
|
|
$line =~ s/\s*=+$//;
|
|
print $line;
|
|
return;
|
|
}
|
|
|
|
if ($line =~ /<\S+\[AT\]\S+>$/i or $line =~ /address removed.*\)/) {
|
|
# Make the author lists verbatim paragraphs.
|
|
$line = " " . $line;
|
|
}
|
|
|
|
if ($line =~ /^and by:/) {
|
|
# This needs to be a regular paragraph.
|
|
$line = "\n" . $line;
|
|
}
|
|
|
|
print $line;
|
|
}
|