<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>intuitive engineering &#187; script</title>
	<atom:link href="http://dougmunsinger.com/tag/script/feed" rel="self" type="application/rss+xml" />
	<link>http://dougmunsinger.com</link>
	<description>doug munsinger</description>
	<lastBuildDate>Fri, 13 Jan 2012 17:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>matter of the lungs</title>
		<link>http://dougmunsinger.com/2010/02/matter-of-the-lungs.html</link>
		<comments>http://dougmunsinger.com/2010/02/matter-of-the-lungs.html#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:02:01 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[entropy]]></category>
		<category><![CDATA[move3]]></category>
		<category><![CDATA[writers]]></category>
		<category><![CDATA[doughter]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=783</guid>
		<description><![CDATA[I&#39;ve been willing my daughter to breathe for the last 24 days.&#160; She came down with leukemia.&#160;&#160; Acute, dangerous and sudden leukemia that tried very hard to kill her.&#160; Right now she is on an oscillating ventilator, with two chest tubes, daily dialysis, and a wall of IVs you would have to see to believe.&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#39;ve been willing my daughter to breathe for the last 24 days.&nbsp;</p>
<p>She came down with leukemia.&nbsp;&nbsp; Acute, dangerous and sudden leukemia that tried very hard to kill her.&nbsp; Right now she is on an oscillating ventilator, with two chest tubes, daily dialysis, and a wall of IVs you would have to see to believe.&nbsp; And she is still breathing.&nbsp;</p>
<p>I have a log rotation script I put together that works for my new employer, Constant Contact.&nbsp; I&#39;ll put that up soon enough.&nbsp;</p>
<p>
	As soon as she is out the other side of all of this.</p>
<p>&#8211;doug</p>
<div class="addtothis"><p>
				<table cellspacing="0" cellpadding="0" border="0" style="width: 180px; height: 30px; text-align: left; margin-left: 0px; ">
				<tbody>
				<tr>
				<td style="text-align: center;">
				<a href="http://www.stumbleupon.com/submit?url=http://dougmunsinger.com/2010/02/matter-of-the-lungs.html&title=matter of the lungs" rel="nofollow">
                                <img src="http://dougmunsinger.com/wp-content/plugins/addtothis/stumble.png" title="Add to Stumble Upon" alt="Stumble It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://del.icio.us/post?url=http://dougmunsinger.com/2010/02/matter-of-the-lungs.html&title=matter of the lungs" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/delicious.png" title="Add to Del.icio.us" alt="Add to Del.cio.us" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://technorati.com/faves?add=http://dougmunsinger.com/2010/02/matter-of-the-lungs.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/technorati.png" title="Add to Technorati" alt="Add to Technorati Favorites" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://digg.com/submit?phase=2&url=http://dougmunsinger.com/2010/02/matter-of-the-lungs.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/digg.png" title="Add to Digg" alt="Digg It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://dougmunsinger.com/feed/rss" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/feeds.png" title="Add Feed to Bookmarks" alt="RSS Feed" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				</tr>
				</tbody>
				</table>

                
		
				</p></div>]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2010/02/matter-of-the-lungs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>another tool for SVN &#8211; list_repositories.pl</title>
		<link>http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html</link>
		<comments>http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html#comments</comments>
		<pubDate>Mon, 11 May 2009 15:28:14 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[move2]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[websphere]]></category>
		<category><![CDATA[CGI.pm]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=762</guid>
		<description><![CDATA[&#160; &#160; One of the features of subversion + apache2 is the ability to list repositories &#8211; natively.&#160; SVNParentPath /apps/repos SVNListParentPath on Unfortunately, once you restrict the httpd.conf to individual repositories and start handling permissions separately you lose that.&#160; Both of these permissions, set at the top level, at the parent path to the repositories, [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p>One of the features of subversion + apache2 is the ability to list repositories &#8211; natively.&nbsp;</p>
<p>SVNParentPath /apps/repos<br />
SVNListParentPath on</p>
<p>Unfortunately, once you restrict the httpd.conf to individual repositories and start handling permissions separately you lose that.&nbsp; Both of these permissions, set at the top level, at the parent path to the repositories, have to be commented out to have the individual permissions on the directories below take effect.</p>
<p>And listing just the repositories wasn&#8217;t enough for what I had in mind &#8211; I wanted a read-only table showing an individual developer or a team lead for a project who has what permissions for the subversion repositories. All the users, all the repositories.</p>
<p>Just your basic cgi.</p>
<p>&nbsp;</p>
<p><a href="http://dougmunsinger.com/images/posts/2009/repos_1.png" rel="shadowbox[sbpost-762];player=img;" title="repository listing cgi"><img src="http://dougmunsinger.com/images/posts/2009/repos_1_420.png" title="repos" alt="repos" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;and the script:</p>
<p><a href="http://dougmunsinger.com/images/posts/2009/list_repositories.pl.txt" title="list_repositories.pl"><br />
</a><code>#! /bin/perl -w</p>
<p>
# script to parse and display users and repositories and rights (R, RW)</p>
<p>use strict;<br />
use CGI qw(:standard);<br />
use CGI::Carp qw(fatalsToBrowser);</p>
<p>
##----------------------------<br />
## Variables<br />
##----------------------------</p>
<p>
#debug<br />
my $debug = 0; #set to 0 to turn off, 1 (true) to turn on </p>
<p># title for page<br />
my $PageTitle = &quot;List of SVN Repositories&quot;;</p>
<p>## repository directory<br />
my $SVN = &quot;/apps/repos&quot;;<br />
## location for htpasswd files<br />
my $HTDIR = &quot;/apps/apache2/conf/htpasswd&quot;;<br />
## Set untainted path<br />
$ENV{PATH} = '/apps/apache2/bin:/bin:/usr/bin:/usr/local/bin';<br />
$ENV{IFS} = &quot;&quot; if $ENV{IFS} ne &quot;&quot;;</p>
<p># css <br />
my $css = &quot;http://&lt;your server name&gt;/css/main.css&quot;;<br />
my $headerimg = &quot;http://&lt;your server name&gt;/css/roger_rabbit_120.jpg&quot;;</p>
<p>
##------------------------------<br />
## MAIN<br />
##------------------------------</p>
<p>&amp;standard_header;<br />
my ($ref_repos, $ref_tabledata, $ref_users) = &amp;CreateTableSpace;<br />
&amp;DisplayTable ($ref_repos, $ref_tabledata, $ref_users);<br />
&amp;standard_footer;<br />
exit;</p>
<p>##------------------------------<br />
## subs<br />
##------------------------------</p>
<p>sub standard_header {<br />
&nbsp;&nbsp;&nbsp; print header();<br />
&nbsp;&nbsp;&nbsp; print start_html(-Title =&gt; &quot;$PageTitle&quot;, -BGCOLOR=&gt;&quot;White&quot;, <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -style =&gt; {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -src =&gt; &quot;${css}&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; );<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;div id=\&quot;header\&quot;&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; print p(&quot;&lt;img src=\&quot;${headerimg}\&quot; title=\&quot;Wells logo\&quot; alt=\&quot;wells logo\&quot;/&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;/div&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;div id=\&quot;headertitle\&quot;&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; print h3(&quot;Repositories&lt;br/&gt;\nusers | read (R) | read &amp; write (RW)\n&quot;); # start_multipart_form() if file upload<br />
}</p>
<p>
sub standard_footer { <br />
&nbsp;&nbsp;&nbsp; print end_html(); <br />
}</p>
<p>
sub CreateTableSpace {<br />
&nbsp;&nbsp;&nbsp; my $ref_repos = &amp;GetBlankRepos;<br />
&nbsp;&nbsp;&nbsp; my @repos = @$ref_repos; # dereference<br />
&nbsp;&nbsp;&nbsp; my %tabledata = (); # hash to hold table data<br />
&nbsp;&nbsp;&nbsp; my @users = (); # list of users<br />
&nbsp;&nbsp;&nbsp; my %seen = (); <br />
&nbsp;&nbsp;&nbsp; foreach my $rep (@repos) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open(FILE, &quot;$HTDIR/${rep}_read&quot;) || croak &quot;Failed to open $HTDIR/${rep}_read for reading...&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my @filelines = &lt;FILE&gt;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close FILE;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $line (@filelines) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # lines are user:passwd<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my ($user, $pass) = split (&quot;:&quot;, $line);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unless ($seen{$user}) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $seen{$user} = 1; # save as seen<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push (@users, $user); # save the user to a list<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tabledata{$rep}{$user} = &quot;read&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; open (FILE, &quot;$HTDIR/${rep}_write&quot;) || croak &quot;Failed to open $HTDIR/${rep}_write for reading&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my @file_lines = &lt;FILE&gt;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; close FILE;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $line (@file_lines) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # lines are user:passwd<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my ($user, $pass) = split (&quot;:&quot;, $line);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unless ($seen{$user}) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $seen{$user} = 1; # save as seen<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push (@users, $user); # save the user to a list<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tabledata{$rep}{$user} = &quot;readwrite&quot;;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; return (\@repos, \%tabledata, \@users);<br />
}</p>
<p>
sub GetBlankRepos {<br />
&nbsp;&nbsp;&nbsp; my @repos = ();<br />
&nbsp;&nbsp;&nbsp; # list $SVN<br />
&nbsp;&nbsp;&nbsp; opendir (DIR, $SVN) || croak &quot;Failed to open directory $SVN for reading...&quot;;<br />
&nbsp;&nbsp;&nbsp; while (defined(my $file = readdir(DIR))) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # skip &quot;.&quot;, &quot;..&quot; and .&lt;hidden&gt; files...<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($file =~ /^\./) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push(@repos, $file);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; return (\@repos);<br />
}</p>
<p>sub DisplayTable {<br />
&nbsp;&nbsp;&nbsp; my $ref_repos = shift;&nbsp; #@repos<br />
&nbsp;&nbsp;&nbsp; my $ref_tabledata = shift; # %tabledata<br />
&nbsp;&nbsp;&nbsp; my $ref_users = shift; # @users<br />
&nbsp;&nbsp;&nbsp; # dereference<br />
&nbsp;&nbsp;&nbsp; my @repos = @$ref_repos;<br />
&nbsp;&nbsp;&nbsp; my %tabledata = %$ref_tabledata;<br />
&nbsp;&nbsp;&nbsp; my @users = @$ref_users;<br />
&nbsp;&nbsp;&nbsp; # repos across the top, users down, R or RW for permissions<br />
&nbsp;&nbsp;&nbsp; # $tabledata{$rep}{$user} = &quot;readwrite&quot;;<br />
&nbsp;&nbsp;&nbsp; # start table<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;table&gt;\n&lt;tbody&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; # table header<br />
&nbsp;&nbsp;&nbsp; my $cols = ($#repos + 1);<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;tr&gt;&lt;td&gt;Users&lt;/td&gt;&lt;td colspan=\&quot;$cols\&quot;&gt;Repositories&lt;/td&gt;&lt;/tr&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;div id=\&quot;repotitles\&quot;&gt;&lt;tr&gt;\n&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp; foreach my $rep (@repos) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;&lt;td&gt;$rep&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; print (&quot;\n&lt;/tr&gt;\n&lt;/div&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; foreach my $user (@users) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;&lt;tr&gt;\n&lt;td&gt;$user&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach my $repo (@repos) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($tabledata{$repo}{$user}) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($tabledata{$repo}{$user} eq &quot;read&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;&lt;td&gt;R&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } elsif ($tabledata{$repo}{$user} eq &quot;readwrite&quot;) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;&lt;td&gt;RW&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;&lt;td&gt;&amp;nbsp; - &amp;nbsp;&lt;/td&gt;&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print (&quot;\n&lt;/tr&gt;\n&quot;);<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; # finish table<br />
&nbsp;&nbsp;&nbsp; print (&quot;&lt;/tbody&gt;\n&lt;/table&gt;\n&quot;);<br />
}</code></p>
<div class="addtothis"><p>
				<table cellspacing="0" cellpadding="0" border="0" style="width: 180px; height: 30px; text-align: left; margin-left: 0px; ">
				<tbody>
				<tr>
				<td style="text-align: center;">
				<a href="http://www.stumbleupon.com/submit?url=http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html&title=another tool for SVN &#8211; list_repositories.pl" rel="nofollow">
                                <img src="http://dougmunsinger.com/wp-content/plugins/addtothis/stumble.png" title="Add to Stumble Upon" alt="Stumble It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://del.icio.us/post?url=http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html&title=another tool for SVN &#8211; list_repositories.pl" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/delicious.png" title="Add to Del.icio.us" alt="Add to Del.cio.us" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://technorati.com/faves?add=http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/technorati.png" title="Add to Technorati" alt="Add to Technorati Favorites" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://digg.com/submit?phase=2&url=http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/digg.png" title="Add to Digg" alt="Digg It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://dougmunsinger.com/feed/rss" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/feeds.png" title="Add Feed to Bookmarks" alt="RSS Feed" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				</tr>
				</tbody>
				</table>

                
		
				</p></div>]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2009/05/subversion-cg-tool-list-repositories.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svnadmin.pl &#8211; perl cgi script to manage svn over apache</title>
		<link>http://dougmunsinger.com/2009/05/svnadmin.html</link>
		<comments>http://dougmunsinger.com/2009/05/svnadmin.html#comments</comments>
		<pubDate>Fri, 08 May 2009 15:29:58 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[apache2]]></category>
		<category><![CDATA[move2]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=738</guid>
		<description><![CDATA[One of the tedious tasks in repository administration is managing users over repositories. Who has access to what repository and to what degree (read-only, or write). Subversion over apache2 allows a tremendous amount of control, down to individual directories within the repository. (see &#34;Per Directory Access Control&#34; in the subversion book). So far I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>One of the tedious tasks in repository administration is managing users over repositories.  Who has access to what repository and to what degree (read-only, or write).  Subversion over apache2 allows a tremendous amount of control, down to individual directories within the repository. (see <a title="per directory access control" href="http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig.httpd.authz.perdir">&quot;Per Directory Access Control&quot; in the subversion book</a>).</p>
<p>So far I haven&#8217;t placed that but I have set up a default deny and then separate htpasswd files for read, or write access permission. This does at times cause TWO passwords to need to be used to first read and then again write to a repository.  However, these are cached, so we&#8217;ll see how much developers find to complain about in that.</p>
<p>The script svnadmin.pl assumes that a naming convention for the relationship bewtween htpasswd access files and subversion repositories is set so that the htpasswd file is named &lt;repository_name&gt;_read and &lt;repository_name&gt;_write.  You need to setthe path to htpasswd, the path to the htpasswd files, and a location for the top level directory of subversion &#8211; the parent directory for all repositories. Within the script you&#8217;ll also need to set the paths for the css file ($css) and for the header image ($headerimg).  This image should be roughly 420 px wide x 200 px high.  I used my corporate logo.</p>
<p>The script also uses a username-as-corporate-ID assumption (begins with &quot;a&quot; or &quot;d&quot; or &quot;x&quot;, contains up to eight characters), and a reasonable password assumption (at least 8 charcaters, nor more than 12, must contain at least one capital letter and one digit).  This is for internal use, not to be exposed, so if you are going to do something like this on ethe internet, you would want to revisit that and lock it down further.</p>
<h3><a title="svnadmin.pl" target="blank" href="http://dougmunsinger.com/images/posts/2009/svnadmin_pl.txt">svnadmin.pl</a></h3>
<h3><a title="main.css" target="blank" href="http://dougmunsinger.com/images/posts/2009/main.css.txt">main.css</a></h3>
<p>To run the script &#8211; save-file-as and then change the first line to &quot;#! /usr/bin/perl&quot; (or the appropriate path for the perl you want to use).  This is basically removing the extra &quot;#&quot; mark.   Rename the script to &quot;svnadmin.pl&quot;, put in your cgi-bin location, and put the main.css file in an appropriate location.  Edit the variables as above.</p>
<p>Screenshots:</p>
<table>
<tbody>
<tr>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_1.png" rel="shadowbox[sbpost-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_1_220.png" /></a></td>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_2.png" rel="shadowbox[sbpost-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_2_220.png" /></a></td>
</tr>
<tr>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_3.png" rel="shadowbox[sbpost-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_3_220.png" /></a></td>
<td><a title="screenshot 1" href="http://dougmunsinger.com/images/posts/2009/svnadmin_4.png" rel="shadowbox[sbpost-738];player=img;"><img rel="lightbox[svn]" alt="screenshot" title="screenshot" src="http://dougmunsinger.com/images/posts/2009/svnadmin_4_220.png" /></a></td>
</tr>
</tbody>
</table>
<p>Really fairly simple. This started with a script called &quot;htpasswd.pl&quot; which I downloaded and reworked, then adapted to use CGI.pm for multi-screen form presentation.  That framework alone was work rediscovering.  I used a similar framework with perl DBI and mysql to do fluid reporting on large system installations 9 years ago.  It recurs.</p>
<p>&mdash; doug</p>
<div class="addtothis"><p>
				<table cellspacing="0" cellpadding="0" border="0" style="width: 180px; height: 30px; text-align: left; margin-left: 0px; ">
				<tbody>
				<tr>
				<td style="text-align: center;">
				<a href="http://www.stumbleupon.com/submit?url=http://dougmunsinger.com/2009/05/svnadmin.html&title=svnadmin.pl &#8211; perl cgi script to manage svn over apache" rel="nofollow">
                                <img src="http://dougmunsinger.com/wp-content/plugins/addtothis/stumble.png" title="Add to Stumble Upon" alt="Stumble It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://del.icio.us/post?url=http://dougmunsinger.com/2009/05/svnadmin.html&title=svnadmin.pl &#8211; perl cgi script to manage svn over apache" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/delicious.png" title="Add to Del.icio.us" alt="Add to Del.cio.us" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://technorati.com/faves?add=http://dougmunsinger.com/2009/05/svnadmin.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/technorati.png" title="Add to Technorati" alt="Add to Technorati Favorites" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://digg.com/submit?phase=2&url=http://dougmunsinger.com/2009/05/svnadmin.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/digg.png" title="Add to Digg" alt="Digg It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://dougmunsinger.com/feed/rss" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/feeds.png" title="Add Feed to Bookmarks" alt="RSS Feed" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				</tr>
				</tbody>
				</table>

                
		
				</p></div>]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2009/05/svnadmin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

