Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On 7/4/07, Jerry McBride [EMAIL PROTECTED] wrote: On Wednesday 04 July 2007 12:39:48 pm Willie Wong wrote: I doubt that his script (which he mentions is to be run in cron) is meant to actually be placed in the cgi-bin directory for apache. It would certainly be annoying to need to have an apache server running just to read documentation. There are some advantages serving the index out via httpd. Anyone you allow can read your documents... I've been working on (in my very spare time) on a similar project. Mine is in python. It scans an entire hard drive for index.html's, chm's and pdf's... then pours it's findings into a single index.html. The script is no where complete, free for the asking though wth setup tips... Hey, thanks for this script. It's an interesting start, at least. A couple of points: 1) Your copyright notice is kind of hidden in the html head tag. I couldn't immediatedly identify the author when looking at the code. I don't think you can copyright the output anyway... 2) As it stands, the code is not much use to me because of the copyright. If you'd license it under your favorite Open Source license, this would be pretty handy. 3) It outputs everything in the order found, which makes it hard to browse. -- Kevin O'Gorman, PhD
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Tue, 3 Jul 2007 15:19:14 -0700 Kevin O'Gorman [EMAIL PROTECTED] 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. Thanks for the script - it seems to create the index file fine. However the index.html files are only readable by root. Is there a treat when running emerge to ensure files are readable by others? -- # ##### ## /###### /# / / ##### // /### ## / / ## ## ## ## ## /### ## ## ## ## ## / ### / ##### / ## [EMAIL PROTECTED] /### ## / / ###/ ## ###/ ## mobile: 07972184336 / ### ## / #### ## ## ## ## ##/ #### ## ## ## ## ## #### ## ## ## ## ## #### ## ## ## ## ## ##/# ## /# ## ## ##/ ## ##/ ## ### / ## ## ## ### ## # ## ##/ ### # / ###/ #/ ### Linux 2.6.20-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On 7/4/07, Kevin O'Gorman [EMAIL PROTECTED] 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 debian have a similar and much nicer tool called dwww which merges all html-doc, htmlized infopages, and htmlized manpages into one uniform system. I think gentoo being better should have an equivelant. But as of yet, no such equivelant exists, which I think is sad, as in my experience, the documentation available to gentoo as a whole is /much/ superior to that on competing distros I have encounted. -- Kent ruby -e '[1, 2, 4, 7, 0, 9, 5, 8, 3, 10, 11, 6, 12, 13].each{|x| print enNOSPicAMreil [EMAIL PROTECTED][(2*x)..(2*x+1)]}' -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
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=headtitleIndex 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
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On 7/3/07, Naga [EMAIL PROTECTED] wrote: On Wednesday 04 July 2007 00:19:14 Kevin O'Gorman wrote: 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? See DOC_SYMLINKS_DIR in make.conf (man page I think, or .example) Thanks, I was able to track it down from that hint. For the record: Read about it in man make.conf. The description there is quite sparse, and I haven't done any emerges since I set it, so I'm not sure exactly how it works. I think it just sets version-independent symlinks, and leaves it up to you whether to bookmark them. Unless there's more going on, I'm going to prefer my little script. It builds a web page with current links, organized by package. I run it in a cron job several times a week, so it's pretty much up-to-date.These are all listed unless they are linked from another index.html higher in the directory structure. This makes most of the entries pretty clean, with a few notable exceptions: boost, java, apache, drscheme, python-docs and mplayer among the packages I have. I'll probably tweak these when I get some time. For me the main advantage is in doing a quick check to see if a given package actually has any index.html files anywhere under /usr/share/doc. Just browsing to the index file can be a pain sometimes, and my patience is usually thinner than usual when I'm desperately seeking documentation. So: am I the only one who likes this? ++ kevin -- Kevin O'Gorman, PhD
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
surely not all the gentooers. Not me, since my bookmarks are day-to-day matters but the doc. 2007/7/4, Kevin O'Gorman [EMAIL PROTECTED]: On 7/3/07, Naga [EMAIL PROTECTED] wrote: [snip] So: am I the only one who likes this? ++ kevin -- Kevin O'Gorman, PhD -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
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=headtitleIndex 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
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Wed, Jul 04, 2007 at 10:28:30AM -0400, Penguin Lover David Relson squawked: 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=headtitleIndex 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; I doubt that his script (which he mentions is to be run in cron) is meant to actually be placed in the cgi-bin directory for apache. It would certainly be annoying to need to have an apache server running just to read documentation. W -- When two egotists meet, it's an I for an I. Sortir en Pantoufles: up 208 days, 15:01 -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Wednesday 04 July 2007 12:39:48 pm Willie Wong wrote: I doubt that his script (which he mentions is to be run in cron) is meant to actually be placed in the cgi-bin directory for apache. It would certainly be annoying to need to have an apache server running just to read documentation. There are some advantages serving the index out via httpd. Anyone you allow can read your documents... I've been working on (in my very spare time) on a similar project. Mine is in python. It scans an entire hard drive for index.html's, chm's and pdf's... then pours it's findings into a single index.html. The script is no where complete, free for the asking though wth setup tips... -- From the Desk of: Jerome D. McBride -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Wed, 4 Jul 2007 09:27:20 -0700 Kevin O'Gorman wrote: 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. ...[snip]... 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. Fair enough :- Evidently I misinterpreted wrote a little Perl script to create ... index.html ... bookmarked it in Firefox to mean bookmarked the script rather than bookmarked index.html. My mistake. David -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Tue, Jul 03, 2007 at 03:19:14PM -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. Here's mine. It uses strictly bash; no perl at all. The setup... - following files sit in the ~/.docpointer/ directory - docpointer (executable script) - docpointer.css - header - footer - from a console execute... ~/.docpointer/docpointer n where n is an integer specifying the number of columns across you want in the output. You *MUST* specify a number. I use between 1 and 3, depending on my mood. It only takes a couple of seconds on an old 450 mhz PIII - I point browser to file:///home/waltdnes/.docpointer/docpointer.html and get a list of html docs. The pathname will obviously be different om your system The files are attached... -- Walter Dnes [EMAIL PROTECTED] In linux /sbin/init is Job #1 Q. Mr. Ghandi, what do you think of Microsoft security? A. I think it would be a good idea. #!/bin/bash makelinktext() { # Search for matches find ${1} -iname ${2} workfile.000 # Generate text for link and append it and the match to workfile.001 while read do # Strip the prefix off the filespec xoffset=$(( ${#1} + 1 )) commenttext=${REPLY:${xoffset}} # If the stripped filespec contains the string /html/, get rid of that commenttext=`echo ${commenttext} | sed s/\/html\//\//g` # Get rid of the string /HTML/ too commenttext=`echo ${commenttext} | sed s/\/HTML\//\//g` # Get rid of the string /doc/ too commenttext=`echo ${commenttext} | sed s/\/doc\//\//g` # Get rid of the string /DOC/ too commenttext=`echo ${commenttext} | sed s/\/DOC\//\//g` # Get rid of the string /doc/ too commenttext=`echo ${commenttext} | sed s/\/docs\//\//g` # Get rid of the string /doc/ too commenttext=`echo ${commenttext} | sed s/\/DOCS\//\//g` # Strip the suffix off the filespec xlength=$(( ${#commenttext} - ${#2} - 1 )) commenttext=${commenttext:0:${xlength}} # Send the stripped filespec, along with the original, to workfile.001 echo ${commenttext} ${REPLY} workfile.001 done workfile.000 } # Get parameter which specifies how many columns across columncount=${1} # Change to ~/.docpointer directory cd ~/.docpointer # Get rid of workfile.001 if it exists. if [[ -a workfile.001 ]]; then rm workfile.001 fi # Get raw search results makelinktext /usr/share/doc index.html makelinktext /usr/share/doc index.htm # Repeat the above lines for any additional searches you want to throw in. # Generate a sorted workfile sort -u workfile.001 workfile.002 # Create the beginning of the docpointer.html file cp header docpointer.html # Put creation date into the link page date docpointer.html # Open the table echo 'table class=t1 cellspacing=4' docpointer.html # Initialize column pointer columnpointer=0 # Read each line in workfile.002 and generate a link while read commenttext urltext do # Increment column pointer columnpointer=$(( ${columnpointer} + 1 )) # If this is the first cell of a row, open the row first if [[ ${columnpointer} -eq 1 ]]; then echo 'tr' docpointer.html rowstatus=open fi # Do the cell echo tda href=\${urltext}\ ${commenttext} '/a/td' docpointer.html # If this is the last cell of a row, close the row, and reset the # column pointer to zero if [[ ${columnpointer} -eq ${columncount} ]]; then echo '/tr' docpointer.html rowstatus=closed columnpointer=0 fi done workfile.002 # If the last row hasn't been closed, close it now if [[ ${rowstatus} = open ]]; then echo '/tr' docpointer.html fi # Close the table echo '/table' docpointer.html # Append the footer to docpointer.html cat footer docpointer.html div.nav_menu { color: #00; background-color: #b4dade; font-weight: bold; font-family: monospace; top: 1px; left: 1px; border-style: groove; padding: 0; } td.tab_cell { background-color: #b4dade; background-image: url(tabimage.gif); background-repeat: no-repeat; font-family: Courier New,Courier,monospace; } pre.listing { font-size: larger; } .bluelight { color: #00; background-color: #c0d0ff; } .highlight { color: #00; background-color: #b4ffb4; font-weight: bold; text-align:
[gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
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 makeindex.perl Description: Binary data
Re: [gentoo-user] Index to /usr/share/doc/...html... a reinvented wheel?
On Wednesday 04 July 2007 00:19:14 Kevin O'Gorman wrote: 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? See DOC_SYMLINKS_DIR in make.conf (man page I think, or .example) -- Naga -- [EMAIL PROTECTED] mailing list