[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Manual page issues in the SVN



Andreas Tille wrote:

> On Fri, 21 Nov 2008, Daniel Leidert wrote:
> 
>> A short look into the manual pages hosted in the debian-med SVN
>> repository revealed several issues:
> 
> Many thanks for your QA effort.  Did you used any script to verify
> these issues or was it a result of a manual investigation.  It might
> be reasonable to run such a script regularly in case it exists or
> just write such a script (perhaps by start using lintian magic
> somehow which seems to check some of these issues as well).

I have a small sed script I use to resolve hyphen/minus problems. I have
run it on all manpages in the debian-med archive and can verify that
many of them have problems. However, I am not keen on fixing and
committing all manpages across the whole archive, so here is the script
(attached) and you can all go fix the manpage(s) you feel most warmly
about :-)

Usage: fixhyphens < manpage-with-hyphen-errors.1 > manpage.1

Cheers
Morten

#! /bin/sh
sed -e '/^.\\"/b' \
    -e '/^.ps/b' \
    -e 's/--/\\-\\-/g' \
    -e 's/ -/ \\-/g' \
    -e 's/\"-/\"\\-/g' \
    -e 's/\[-/\[\\-/g' \
    -e 's/(-/(\\-/g' \
    -e 's/{-/{\\-/g' \
    -e 's/\]-/\]\\-/g' \
    -e 's/)-/)\\-/g' \
    -e 's/}-/}\\-/g' \
    -e 's/^-/\\-/' \
    -e 's/\\^-/\\^\\-/g' \
    -e 's/\\0-/\\0\\-/g' \
    -e 's/\\|-/\\|\\-/g' 



# skip comments .\"
# .ps can contain a negative number as argument, hence skip those lines.
# change -- to \-\-
# change ' -' to ' \-'
# change "- to "\-
# change \^- to \^\-
# change \0- to \0\-
# change \|- to \|\-
# (\0 request is a digit-sized space, \| produces one-sixth of a character 
# width, and \^ produces one-twelfth)

Reply to: