Package: apt-utils Version: 2.1.15 Severity: minor Dear Maintainer,
the attachment contains a shell script to fix man pages created from a docbook file. Main improvements are: # Remove trailing spaces. # Remove .PP after .SH and .SH. # Remove '\&' before a period inside or after a word. # '\&' suppresses kerning between characters on both sides of it. # Break lines after a punctuation mark and before a parentheses. # To make lines shorter and easier to read, edit, and make a diff. sed -e '/\\"/n' \ -e '/^\.TS,^\.TE/n' \ -e 's/ *$//' \ -e '/^\.S[SH]/{n; /\.PP/d}' \ -e 's/\([^ ]\)\\&\./\1./g' \ -e 's/\([^ ][.,;!?]\) */\1\n/g' \ -e 's/ (/\n(/g' ${1:--} An example is "apt-extracttemplates.1". -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.10.4-1 (SMP w/2 CPU threads) Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages apt-utils depends on: ii apt 2.1.15 ii libapt-pkg6.0 2.1.15 ii libc6 2.31-9 ii libdb5.3 5.3.28+dfsg1-0.6 ii libgcc-s1 10.2.1-3 ii libstdc++6 10.2.1-3 apt-utils recommends no packages. apt-utils suggests no packages. -- no debconf information -- Bjarni I. Gislason
#!/bin/sh set -efu # Skip lines with comments. # Skip tables. # Remove trailing spaces. # Remove .PP after .SH and .SH. # Remove '\&' before a period inside or after a word. # '\&' suppresses kerning between characters on both sides of it. # Break lines after a punctuation mark, before a parentheses. # To make lines shorter and easier to edit and diff. sed -e '/\\"/n' \ -e '/^\.TS,^\.TE/n' \ -e 's/ *$//' \ -e '/^\.S[SH]/{n; /\.PP/d}' \ -e 's/\([^ ]\)\\&\./\1./g' \ -e 's/\([^ ][.,;!?]\) */\1\n/g' \ -e 's/ (/\n(/g' ${1:--}