public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Documentation Index
@ 2006-12-31  0:03 Kevin O'Gorman
  2006-12-31  0:19 ` Graham Murray
  2006-12-31  3:20 ` Jerry McBride
  0 siblings, 2 replies; 14+ messages in thread
From: Kevin O'Gorman @ 2006-12-31  0:03 UTC (permalink / raw
  To: gentoo-user

There's a lot of HTML documentation on my computer, but it's
wonderfully hard to find and use compared to man pages
because it's not indexed.

So I started building a Perl script to create a top-level
HTML index page automatically from the .html files it
finds lying around.  I started with just the contents of
/usr/share/doc.

Before I go too much farther, I thought I'd ask if anyone knows
of an existing product (that is surely more refined than
this little starter gizmo I've got so frar) that does the
same or similar thing?

If not, are there any other places where generally useful
HTML might be hiding?

++ kevin

PS: the script so far:


#!/usr/bin/perl -w

chdir "/usr/share/doc" or die "Cannot cd to /usr/share/doc: $!";

open FIND, "find . -name index.html |sort|" or die "Cannot fork: $!";
print "<head><title>Index of /usr/share/doc index files</title>\n";
print "<style type=\"text/css\">\n";
print "    li, p { margin-top: 0in; margin-bottom: 0in; }\n";
print "</style>\n";
print "</head>\n";
print "<body>\n";
print "<h1>Index of /usr/share/doc index files</h1>\n";
print "<ul>\n";

while (<FIND>) {
    chomp;
    s:^\./::;
    $path = $_;
    $path =~ s:/index.html$::;

    print "    <li><p><a href=\"$_\">$path</a></li>\n";

}
close FIND;
print "</ul>\n";
print "</body>\n";

-- 
Kevin O'Gorman, PhD
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-01-04 14:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-31  0:03 [gentoo-user] Documentation Index Kevin O'Gorman
2006-12-31  0:19 ` Graham Murray
2006-12-31  3:20 ` Jerry McBride
2006-12-31  4:04   ` David Relson
2006-12-31  5:00     ` Kevin O'Gorman
2006-12-31 17:38       ` Jerry McBride
2007-01-01  1:28         ` Kevin O'Gorman
2007-01-01 11:43           ` Neil Bothwick
2007-01-01 18:18           ` Jerry McBride
2006-12-31 10:50   ` Mick
2006-12-31 10:57     ` iddqd
2006-12-31 12:39       ` Kent Fredric
2006-12-31 12:46       ` Mick
2007-01-04 15:13         ` Etaoin Shrdlu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox