* [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
* Re: [gentoo-user] Documentation Index 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 1 sibling, 0 replies; 14+ messages in thread From: Graham Murray @ 2006-12-31 0:19 UTC (permalink / raw To: gentoo-user "Kevin O'Gorman" <kogorman@gmail.com> writes: > 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. It would be nice if portage did this automatically in the same way as it does for .info files. -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 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 10:50 ` Mick 1 sibling, 2 replies; 14+ messages in thread From: Jerry McBride @ 2006-12-31 3:20 UTC (permalink / raw To: gentoo-user On Saturday 30 December 2006 19:03, Kevin O'Gorman wrote: > 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? > I've been doing a similar project using python. I scan the entire filesystem for html, pdf and chm files. Once found, I grab matching portage names and build a master html index for use with apache... Nice to know that someone else has the desire for handy document indexes... -- Jerry McBride -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 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 10:50 ` Mick 1 sibling, 1 reply; 14+ messages in thread From: David Relson @ 2006-12-31 4:04 UTC (permalink / raw To: gentoo-user; +Cc: mcbrides9 On Sat, 30 Dec 2006 22:20:18 -0500 Jerry McBride wrote: > On Saturday 30 December 2006 19:03, Kevin O'Gorman wrote: > > 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? > > > > I've been doing a similar project using python. I scan the entire > filesystem for html, pdf and chm files. Once found, I grab matching > portage names and build a master html index for use with apache... > > Nice to know that someone else has the desire for handy document > indexes... I, for one, would be interested in seeing a copy of your script :-> David -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2006-12-31 4:04 ` David Relson @ 2006-12-31 5:00 ` Kevin O'Gorman 2006-12-31 17:38 ` Jerry McBride 0 siblings, 1 reply; 14+ messages in thread From: Kevin O'Gorman @ 2006-12-31 5:00 UTC (permalink / raw To: gentoo-user On 12/30/06, David Relson <relson@osagesoftware.com> wrote: > On Sat, 30 Dec 2006 22:20:18 -0500 > Jerry McBride wrote: > > > On Saturday 30 December 2006 19:03, Kevin O'Gorman wrote: > > > 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? > > > > > > > I've been doing a similar project using python. I scan the entire > > filesystem for html, pdf and chm files. Once found, I grab matching > > portage names and build a master html index for use with apache... > > > > Nice to know that someone else has the desire for handy document > > indexes... > > I, for one, would be interested in seeing a copy of your script :-> > If you mean mine, it's so short (so far) that I put it in the original message. If you mean Jerry McBride's, I'd like to see it too. Hey, Jerry, wanna make a project team? I woulda done Python if I had thought it was gonna get big. It now seems like that would be a good idea. Care to: 1) share your code? 2) start a sourceforge project? 3) just tantalize us with your results? ++ kevin -- Kevin O'Gorman, PhD -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2006-12-31 5:00 ` Kevin O'Gorman @ 2006-12-31 17:38 ` Jerry McBride 2007-01-01 1:28 ` Kevin O'Gorman 0 siblings, 1 reply; 14+ messages in thread From: Jerry McBride @ 2006-12-31 17:38 UTC (permalink / raw To: gentoo-user On Sunday 31 December 2006 00:00, Kevin O'Gorman wrote: > Hey, Jerry, wanna make a project team? I woulda done Python if I had > thought it was gonna get big. It now seems like that would be a good idea. > Care to: > 1) share your code? > 2) start a sourceforge project? > 3) just tantalize us with your results? > It's far, far from being finished or polished... here it is: #!/usr/bin/python # try: import psyco psyco.full() except ImportError: print "Non-Fatal error importing PSYCO" pass # try: import readline except ImportError: print "Fatal Error importing readline" sys.exit(1) # try: import struct except ImportError: print "Fatal Error importing struct" sys.exit(1) # try: import string except ImportError: print "Fatal Error importing string" sys.exit(1) # try: import sys except ImportError: print "Fatal Error imporing sys" sys.exit(1) # try: import os except ImportError: print "Fatal Error imporing os" sys.exit(1) al="array.list" il="index.list" ni="/var/www/localhost/htdocs/index2.html" z=0 rightNow="today!" version="1.0" print "Every Damn Index - version ",version print "" print 'Scanning hard drive and creating list of all discovered files.' print "" os.system('tree -fixn --noreport -o '+il+' /') print 'Construction of index list completed!' print "" print"Reading text from: ", il print "" # # read index.list and create new array list # input=open(il,'r') output=open(al,'w') for line in input.readlines(): # strip off leading and trailing spaces line = string.strip(line, " ") # stip off CR's line = string.rstrip(line,chr(10)) words=string.split(line,"/") steps=len(words) if words[steps-1]=="index.html": output.writelines(line+chr(10)) words=string.split(line,".") steps=len(words) if words[steps-1]=="pdf": output.writelines(line+chr(10)) words=string.split(line,".") steps=len(words) if words[steps-1]=="chm": output.writelines(line+chr(10)) z=z+1 if z > 2000: print ".", z=0 print"" print "Successfully processed ",il print"" input.close() output.close() print"Reading text from: "+al+" and building new "+ni print"" input=open(al,'r') output=open(ni,'w') output.writelines('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'+chr(10)) output.writelines("<html>"+chr(10)) output.writelines("<head>"+chr(10)) output.writelines("<title>Evey Damn Index "+version+"- copyright Jerome D. McBride - 2006</title>"+chr(10)) output.writelines('<meta name="GENERATOR" content="NONE">'+chr(10)) output.writelines('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">'+chr(10)) #output.writelines('<img id= "logo" src="http://www.expertsrt.com/images/xrt.png" alt="ERT Logo" style="vertical-align:top"/>'+chr(10)) output.writelines("</head>"+chr(10)) output.writelines("<body>"+chr(10)) output.writelines("<hr>"+chr(10)) output.writelines("<strong> Every Damn Index - Version "+version+" </strong>"+chr(10)) output.writelines("<hr>"+chr(10)) output.writelines("This page conatins a list of all available html indexes, .pdf and .chm files"+chr(10)) output.writelines("created "+rightNow+chr(10)) output.writelines("<hr>"+chr(10)) output.writelines("<br>"+chr(10)) z=0 for line in input.readlines(): # strip off leading and trailing spaces line = string.strip(line, " ") # strip off leading and trailing slashes line = string.strip(line, "/") # stip off CR's line = string.rstrip(line,chr(10)) print 'Looking for package info for:', line #clean up previous info.dat file os.system("rm info.dat 2>/dev/null 1>/dev/null") os.system('/usr/bin/equery belongs '+line+' >info.dat') inputData=open('info.dat','r') infoText=inputData.read() inputData.close() if len(infoText)==0: infoText="PNA/PNA" words=string.split(infoText,"/") steps=len(words) groupName=words[0] packageName=words[1] output.writelines('<br>--'+packageName+'-- <a href="'+line+'">documentation</a> found at '+line+'</br>'+chr(10)) output.writelines("<hr>"+chr(10)) output.writelines("The end..."+chr(10)) output.writelines("<br>"+chr(10)) output.writelines("</body>"+chr(10)) output.writelines("</html>"+chr(10)) print "New index2.html written to ",ni,"." print "" print "Program successfully shutdown." print "" input.close() output.close() os.system("rm "+al+" 2>/dev/null 1>/dev/null") os.system("rm "+il+" 2>/dev/null 1>/dev/null") os.system("rm info.dat 2>/dev/null 1>/dev/null") sys.exit(0) As for manning a project... time hasn't allowed me the pleasure of a decent day off from work. I would, however, contribute as I can. Cheers all and enjoy -- Jerry McBride -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 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 0 siblings, 2 replies; 14+ messages in thread From: Kevin O'Gorman @ 2007-01-01 1:28 UTC (permalink / raw To: gentoo-user On 12/31/06, Jerry McBride <mcbrides9@comcast.net> wrote: > On Sunday 31 December 2006 00:00, Kevin O'Gorman wrote: > > Hey, Jerry, wanna make a project team? I woulda done Python if I had > > thought it was gonna get big. It now seems like that would be a good idea. > > Care to: > > 1) share your code? > > 2) start a sourceforge project? > > 3) just tantalize us with your results? > > > > > It's far, far from being finished or polished... here it is: > ... snip ... > > As for manning a project... time hasn't allowed me the pleasure of a decent > day off from work. I would, however, contribute as I can. > > Cheers all and enjoy Thanks very much. You don't need to man a project, only start one if you're willing. I would need you to release your code under some Open Source License. It would be most convenient if you did both at once, by starting a sourceforge project with your code and chosen license. Then authorize at least one alternate project manager, and you never need do anything about it again. Normal ettiquette would allow you as originator "considerable" (understatement) influence over any decisions made in the project, but you can also just ignore them. BTW, I like your program but its package search sure seems slow. That would probably be the first thing I'd try to improve. It's still running a few hours after starting. ++ kevin -- Kevin O'Gorman, PhD -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2007-01-01 1:28 ` Kevin O'Gorman @ 2007-01-01 11:43 ` Neil Bothwick 2007-01-01 18:18 ` Jerry McBride 1 sibling, 0 replies; 14+ messages in thread From: Neil Bothwick @ 2007-01-01 11:43 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 495 bytes --] On Sun, 31 Dec 2006 17:28:44 -0800, Kevin O'Gorman wrote: > BTW, I like your program but its package search sure seems slow. If you only wanted to index files from portage-installed packages, you could read the CONTENTS files in /var/db/pkg instead of scanning the filesystem. Limiting it to portage would also give the opportunity to call the script in an "update" mode from the portage post_inst hooks. -- Neil Bothwick If at first you don't succeed, you're about normal. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2007-01-01 1:28 ` Kevin O'Gorman 2007-01-01 11:43 ` Neil Bothwick @ 2007-01-01 18:18 ` Jerry McBride 1 sibling, 0 replies; 14+ messages in thread From: Jerry McBride @ 2007-01-01 18:18 UTC (permalink / raw To: gentoo-user On Sunday 31 December 2006 20:28, Kevin O'Gorman wrote: > On 12/31/06, Jerry McBride <mcbrides9@comcast.net> wrote: > > On Sunday 31 December 2006 00:00, Kevin O'Gorman wrote: > > > Hey, Jerry, wanna make a project team? I woulda done Python if I had > > > thought it was gonna get big. It now seems like that would be a good > > > idea. Care to: > > > 1) share your code? > > > 2) start a sourceforge project? > > > 3) just tantalize us with your results? > > > > It's far, far from being finished or polished... here it is: > > ... snip ... > > > As for manning a project... time hasn't allowed me the pleasure of a > > decent day off from work. I would, however, contribute as I can. > > > > Cheers all and enjoy > > Thanks very much. You don't need to man a project, only start one if > you're willing. I would need you to release your code under some Open > Source License. It would be most convenient if you did both at once, by > starting a sourceforge project with your code and chosen license. Then > authorize at least one alternate project manager, and you never need do > anything about it again. > > Normal ettiquette would allow you as originator "considerable" > (understatement) influence over any decisions made in the project, but you > can also just ignore them. > > BTW, I like your program but its package search sure seems slow. That > would probably be the first thing I'd try to improve. It's still running a > few hours after > starting. > It's low alright. What it does is compare found matches to what exists in portage using equery as the lookup tool. Equery is not fast... -- Jerry McBride -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2006-12-31 3:20 ` Jerry McBride 2006-12-31 4:04 ` David Relson @ 2006-12-31 10:50 ` Mick 2006-12-31 10:57 ` iddqd 1 sibling, 1 reply; 14+ messages in thread From: Mick @ 2006-12-31 10:50 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 328 bytes --] On Sunday 31 December 2006 03:20, Jerry McBride wrote: > I've been doing a similar project using python. I scan the entire > filesystem for html, pdf and chm files. Once found, I grab matching portage > names and build a master html index for use with apache... How do you view chm files in Linux? -- Regards, Mick [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 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 0 siblings, 2 replies; 14+ messages in thread From: iddqd @ 2006-12-31 10:57 UTC (permalink / raw To: gentoo-user Mick wrote: > On Sunday 31 December 2006 03:20, Jerry McBride wrote: > > >> I've been doing a similar project using python. I scan the entire >> filesystem for html, pdf and chm files. Once found, I grab matching portage >> names and build a master html index for use with apache... >> > > How do you view chm files in Linux? > * x11-misc/xchm Latest version available: 1.7.1 Latest version installed: [ Not Installed ] Size of files: 345 kB Homepage: http://xchm.sf.net Description: Utility for viewing Microsoft .chm files. License: GPL-2 -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2006-12-31 10:57 ` iddqd @ 2006-12-31 12:39 ` Kent Fredric 2006-12-31 12:46 ` Mick 1 sibling, 0 replies; 14+ messages in thread From: Kent Fredric @ 2006-12-31 12:39 UTC (permalink / raw To: gentoo-user debian have a nice system which indexes the HTML files. When I moved to gentoo 2 years ago it was one of the things i missed. http://packages.debian.org/stable/doc/dhelp I think that was it, integrated MAN/INFO & HTML all into one system. On 12/31/06, iddqd <iddqd@silenthate.com> wrote: > Mick wrote: > > On Sunday 31 December 2006 03:20, Jerry McBride wrote: > > > > > >> I've been doing a similar project using python. I scan the entire > >> filesystem for html, pdf and chm files. Once found, I grab matching portage > >> names and build a master html index for use with apache... > >> > > > > How do you view chm files in Linux? > > > * x11-misc/xchm > Latest version available: 1.7.1 > Latest version installed: [ Not Installed ] > Size of files: 345 kB > Homepage: http://xchm.sf.net > Description: Utility for viewing Microsoft .chm files. > License: GPL-2 > -- > gentoo-user@gentoo.org mailing list > > -- /<ent Fredric (aka theJackal) -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 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 1 sibling, 1 reply; 14+ messages in thread From: Mick @ 2006-12-31 12:46 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 745 bytes --] On Sunday 31 December 2006 10:57, iddqd wrote: > Mick wrote: > > On Sunday 31 December 2006 03:20, Jerry McBride wrote: > >> I've been doing a similar project using python. I scan the entire > >> filesystem for html, pdf and chm files. Once found, I grab matching > >> portage names and build a master html index for use with apache... > > > > How do you view chm files in Linux? > > * x11-misc/xchm > Latest version available: 1.7.1 > Latest version installed: [ Not Installed ] > Size of files: 345 kB > Homepage: http://xchm.sf.net > Description: Utility for viewing Microsoft .chm files. > License: GPL-2 Sweet. Thanks! Happy New Year to all! :) -- Regards, Mick [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] Documentation Index 2006-12-31 12:46 ` Mick @ 2007-01-04 15:13 ` Etaoin Shrdlu 0 siblings, 0 replies; 14+ messages in thread From: Etaoin Shrdlu @ 2007-01-04 15:13 UTC (permalink / raw To: gentoo-user On Sunday 31 December 2006 13:46, Mick wrote: > > > How do you view chm files in Linux? > > > > * x11-misc/xchm > > Latest version available: 1.7.1 > > Latest version installed: [ Not Installed ] > > Size of files: 345 kB > > Homepage: http://xchm.sf.net > > Description: Utility for viewing Microsoft .chm files. > > License: GPL-2 > > Sweet. Thanks! I also like the kde viewer, kchmviewer. -- 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