tag 303651 patch
thanks

A manpage is attached and will be included in the next upload.  (Also
including a script I used to generate the content of the manpage).
They have also been forwarded upstream.

Justin
#!/usr/bin/perl -w
use strict;

my $s=`html2text -nobs -width 9999 /usr/share/doc/saods9/doc/ref/command.html`;
$s=~s/References.*$//s;
while ($s=~s/\n.*? *\* \[[0-9]+\].*?\n/\n/s) {};

my @opts=(`ds9 -? |sed -rne 's/^ -([^   ]*)([   ]|\$).*\$/\\1/p' |grep -v 
'^?\$'`);

foreach my $opt (@opts) {
        chomp $opt;
        $opt=~s/[       ]$//;

        $s=~m/(\n[      ]*$opt[  \n].*)/s || next;
        my $optinfo=$1;

        foreach my $opt2 (@opts) {
                chomp $opt2;
                $opt2=~s/[      ]$//;
                next if $opt2=~m/^$opt$/;
                $optinfo=~s/\n[  ]*$opt2[ \n    ].*$//s;
        }

        $optinfo=~s/$opt//s;
        $optinfo=~s/ +/ /sg;

        print "\n.TP";
        print "\n.BR \\-$opt\n";

        $optinfo=~s/^[  \n]*//s;
        $optinfo=~s/\n+/\n/sg;
        $optinfo=~s/Syntax:/\n.RS 4\n.B Syntax\n.RS 4/sg;
        $optinfo=~s/Example:/\n.RE\n.RE\n.RS 4\n.B Example:\n.RS 4/sg;
        $optinfo=~s/\$(ds9.*?)\n/\n.RS 0\n$1\n.RE\n/gs;
        $optinfo=~s/\$(ds9.*?)$/\n.RS 0\n$1\n.RE\n/gs;

        print "$optinfo";
        print "\n.RE\n.RE\n\n";
}

Attachment: ds9.1.gz
Description: Binary data

Reply via email to