1 |
On 7/4/07, David Relson <relson@×××××××××××××.com> wrote: |
2 |
> |
3 |
> On Tue, 3 Jul 2007 15:19:14 -0700 |
4 |
> Kevin O'Gorman wrote: |
5 |
> |
6 |
> > I emerge with the doc USE flag and generally have a bunch of stuff in |
7 |
> > /usr/share/doc. Most of the time it's the HTML stuff I want to read, |
8 |
> > but it's a annoyingly laborious to wade through unindexed |
9 |
> > directgories and get a browser pointing to the right thing. So I |
10 |
> > wrote a little Perl script to create a top-level "index.html", |
11 |
> > organized by package and with a bit of rudimentary pruning. I |
12 |
> > bookmarked it in Firefox, and can get to things a lot faster now. I |
13 |
> > like the result, and will continue to tweak it here and there. |
14 |
> > |
15 |
> > Did I just reinvent a wheel? If not, is there any point it trying to |
16 |
> > make this part of gentoo? If so, how would one do that? |
17 |
> > |
18 |
> > Current script attached. |
19 |
> > |
20 |
> > -- |
21 |
> > Kevin O'Gorman, PhD |
22 |
> |
23 |
> Hi Kevin, |
24 |
> |
25 |
> After saving your script to /var/www/localhost/cgi-bin/makeindex.perl |
26 |
> and running "chmod +x ...", I pointed firefox at |
27 |
> http://localhost/cgi-bin/makeindex.perl and got the following: |
28 |
> |
29 |
> Internal Server Error |
30 |
> |
31 |
> The server encountered an internal error or misconfiguration and |
32 |
> was unable to complete your request. |
33 |
> |
34 |
> Please contact the server administrator, root@localhost and inform |
35 |
> them of the time the error occurred, and anything you might have |
36 |
> done that may have caused the error. |
37 |
> |
38 |
> More information about this error may be available in the server |
39 |
> error log. |
40 |
> |
41 |
> Looking in /var/log/apache2/error_log I found |
42 |
> |
43 |
> [Wed Jul 04 10:22:06 2007] [error] [client 127.0.0.1] malformed |
44 |
> header from script. Bad header=<head><title>Index of /usr/sha: |
45 |
> makeindex.perl |
46 |
> |
47 |
> |
48 |
> Looking at other simple scripts lead me to add |
49 |
> |
50 |
> print "Content-type: text/html; charset=iso-8859-1\n\n"; |
51 |
> |
52 |
> All is good now! |
53 |
> |
54 |
> Cheers, |
55 |
> |
56 |
> David |
57 |
> -- |
58 |
> gentoo-user@g.o mailing list |
59 |
> |
60 |
> |
61 |
Hmm. I never intended to run it that way. I run a cronjob as root, with |
62 |
output directed to "index.html". I'd worry that your way would be too slow. |
63 |
|
64 |
-- |
65 |
Kevin O'Gorman, PhD |