From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1I65yL-0003Hg-TG for garchives@archives.gentoo.org; Wed, 04 Jul 2007 14:36:50 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l64EYEp9008463; Wed, 4 Jul 2007 14:34:14 GMT Received: from mail.osagesoftware.com (osagesoftware.com [216.144.204.42]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l64ESVK1001144 for ; Wed, 4 Jul 2007 14:28:31 GMT Received: from osage.osagesoftware.com (osage.osagesoftware.com [192.168.1.10]) by mail.osagesoftware.com (Postfix) with ESMTP id F3DF784076 for ; Wed, 4 Jul 2007 10:28:30 -0400 (EDT) Date: Wed, 4 Jul 2007 10:28:30 -0400 From: David Relson To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel? Message-ID: <20070704102830.10f2392f@osage.osagesoftware.com> In-Reply-To: <9acccfe50707031519w73abc638qb001cc5e9bb64d88@mail.gmail.com> References: <9acccfe50707031519w73abc638qb001cc5e9bb64d88@mail.gmail.com> Organization: Osage Software Systems, Inc. X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.11; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: f81adb45-c8c5-4fc4-a73f-6a865658c418 X-Archives-Hash: e3ccf5c212de80041efa42c70536e813 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, root@localhost 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=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 -- gentoo-user@gentoo.org mailing list