<commit_before>This describes my webglimpse experience. What a mess!

First off, install the /usr/ports/www/webglimpse package. I came up
two problems with this. First off is the cgi setup in the httpd.conf
file was pointing at /usr/local/share instead of /usr/local/www.
After I fixed that, I went to /usr/local/www and cleaned it out a bit
(remove cgi-bin stuff and data links).

Next, the webglimpse/wginstall perl program is broken. Some mkdir had
to be commnented out. It also crapped out chmoding the stuff it
installed into /usr/local/www/cgi-bin to 755. I just did it by hand
cause I don't want to mess with it.

Okay, so now its installed:

	cd /usr/testbed
	mkdir webglimpse
	cd webglimpse
	/usr/local/www/webglimpse/confarc

Answer the questions. Pretty obvious, although you want D(directory)
searching, and you want to store the files in /usr/testbed/webglimpse,
but you want to *search* /usr/testbed/www.

Next edit .wgfilter-inde and add these lines at the top to keep
from indexing the source code and other stuff we do not want to leak out.

	Deny  (^|/)webglimpse
	Allow \.html?$
	Deny .*

Now run wgreindex in that directory again.

Next edit archive.cfg and change the urlpath line:

	urlpath http://www.emulab.net

Now for the really ugly one. We need to arrange for the files to go
through the doc wrappers! That means editing the webglimpse perl code
in one spot. In /usr/local/www/webglimpse/lib/OutputTool.pm, change
the makeLinkOutput function to this:

    sub makeLinkOutput {
    	my $self = shift;
    	my($link, $title, $date) = @_;
    
    	if ($link =~ /^(.*)\/(.*\..*)$/) {
    	    $link = "$main::urlpath/$1/docwrapper.php3?docname=$2\n";
    	}
    	
    	my $retstring =	"<hr><b><A HREF=\"".$link."\">";
    	$retstring .= $title."</A></b>, $date<br>\n";
    
    	return $retstring;
    }

<commit_msg>Update webglimpse install instructions slightly. I'll try following them today and see what happens.<commit_after>This describes my webglimpse experience. What a mess!

Install the /usr/ports/www/webglimpse package. I came up two problems
with this.

First problem: The cgi setup in the httpd.conf file was pointing at
/usr/local/share instead of /usr/local/www.  After I fixed that, I
went to /usr/local/www and cleaned it out a bit (remove cgi-bin stuff
and data links). You also need this in httpd.conf (or apache.conf).

	<Directory /usr/testbed/webglimpse>
		Options MultiViews
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>

Second problem: The webglimpse/wginstall perl program is broken. Some
mkdir had to be commnented out. It also crapped out chmoding the stuff
it installed into /usr/local/www/cgi-bin to 755. I just did it by hand
cause I don't want to mess with it.

Okay, so now its installed:

	cd /usr/testbed
	mkdir webglimpse
	cd webglimpse
	/usr/local/www/webglimpse/confarc

Answer the questions. Pretty obvious, although you want D(directory)
searching, and you want to store the files in /usr/testbed/webglimpse,
but you want to *search* /usr/testbed/www.

Next edit .wgfilter-inde and add these lines at the top to keep
from indexing the source code and other stuff we do not want to leak out.

	Deny  (^|/)webglimpse
	Allow \.html?$
	Deny .*

Now run wgreindex in that directory again.

Next edit archive.cfg and change the urlpath line:

	urlpath http://www.emulab.net

Now for the really ugly one. We need to arrange for the files to go
through the doc wrappers! That means editing the webglimpse perl code
in one spot. In /usr/local/www/webglimpse/lib/OutputTool.pm, change
the makeLinkOutput function to this:

    sub makeLinkOutput {
    	my $self = shift;
    	my($link, $title, $date) = @_;
    
    	if ($link =~ /^(.*)\/(.*\..*)$/) {
    	    $link = "$main::urlpath/$1/docwrapper.php3?docname=$2\n";
    	}
    	
    	my $retstring =	"<hr><b><A HREF=\"".$link."\">";
    	$retstring .= $title."</A></b>, $date<br>\n";
    
    	return $retstring;
    }


{'fraction_non_alphanumeric': 0.10343955488113303, 'fraction_numerical': 0.0030349013657056147, 'mean_word_length': 3.2803030303030303, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2925665', 'n_tokens_mistral': 1328, 'n_tokens_neox': 1332, 'n_words': 517}