On 7/4/07, David Relson <[EMAIL PROTECTED]> wrote:

On Tue, 3 Jul 2007 15:19:14 -0700
Kevin O'Gorman wrote:

> I emerge with the doc USE flag and generally have a bunch of stuff in
> /usr/share/doc.  Most of the time it's the HTML stuff I want to read,
> but it's a annoyingly laborious to wade through unindexed
> directgories and get a browser pointing to the right thing.  So I
> wrote a little Perl script to create a top-level "index.html",
> organized by package and with a bit of rudimentary pruning.  I
> bookmarked it in Firefox, and can get to things a lot faster now.  I
> like the result, and will continue to tweak it here and there.
>
> Did I just reinvent a wheel? If not, is there any point it trying to
> make this part of gentoo?  If so, how would one do that?
>
> Current script attached.
>
> --
> Kevin O'Gorman, PhD

Hi Kevin,

After saving your script to /var/www/localhost/cgi-bin/makeindex.perl
and running "chmod +x ...", I pointed firefox at
http://localhost/cgi-bin/makeindex.perl and got the following:

    Internal Server Error

    The server encountered an internal error or misconfiguration and
    was unable to complete your request.

    Please contact the server administrator, [EMAIL PROTECTED] and inform
    them of the time the error occurred, and anything you might have
    done that may have caused the error.

    More information about this error may be available in the server
    error log.

Looking in /var/log/apache2/error_log I found

    [Wed Jul 04 10:22:06 2007] [error] [client 127.0.0.1] malformed
header from script. Bad header=<head><title>Index of /usr/sha:
makeindex.perl


Looking at other simple scripts lead me to add

    print "Content-type: text/html; charset=iso-8859-1\n\n";

All is good now!

Cheers,

David
--
[EMAIL PROTECTED] mailing list


Hmm.  I never intended to run it that way.  I run a cronjob as root, with
output directed to "index.html".  I'd worry that your way would be too slow.

--
Kevin O'Gorman, PhD

Reply via email to