# File.exist? svn2rss.rb

**URL:** <https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900>\
**Category:** Ruby\
**Created:** [February 16, 2006, 11:41am UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900 "2006-02-16T11:41:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bil\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Post date:** [February 16, 2006, 11:41am UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900/1 "2006-02-16T11:41:16Z")

</div>

Hello,

We’re migrating from CVS to Subversion and I am looking  
for a Ruby post-commit hook to produce an RSS feed.

I found this November '05 post by Jamis,

[http://comox.textdrive.com/pipermail/budgetwise/2005-November/000117.html](http://comox.textdrive.com/pipermail/budgetwise/2005-November/000117.html)

but I can’t seem to find any code. (I can’t understand  
the Python version in SVN’s contrib/commit-hooks directory.)

Anyone?

Thanks,

---

<div class="post-metadata">

**Author:** ![Bil\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Post date:** [February 16, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900/2 "2006-02-16T17:47:16Z")

</div>

Hi,

In [dt1kml$ebe$removed\_email\_address@domain.invalid](mailto:dt1kml$ebe$removed_email_address@domain.invalid)  
“File.exist? svn2rss.rb” on Thu, 16 Feb 2006 19:38:34 +0900,  
Bil K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> We’re migrating from CVS to Subversion and I am looking  
> for a Ruby post-commit hook to produce an RSS feed.

tools/hook-scripts/commit-email.rb is what you looking  
for. This script not just sending an e-mail but also  
producing a RSS feed.

commit-email.rb   
“$REPOS” “$REV” removed\_email\_address@domain.invalid   
-r [http://YOUR.HOST/REPOSITORY/TOP/URI](http://YOUR.HOST/REPOSITORY/TOP/URI)   
–rss-path /PATH/TO/RSS.rdf   
–rss-uri [http://YOUR.HOST/URI/OF/RSS.rdf](http://YOUR.HOST/URI/OF/RSS.rdf)   
… and other options …

Thanks,

---

<div class="post-metadata">

**Author:** ![Bil\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Post date:** [February 16, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900/3 "2006-02-16T22:25:28Z")

</div>

Kouhei S. wrote:

> Hi,

Hello.

> Bil K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > We’re migrating from CVS to Subversion and I am looking  
> > for a Ruby post-commit hook to produce an RSS feed.
> 
> tools/hook-scripts/commit-email.rb is what you looking  
> for. This script not just sending an e-mail but also  
> producing a RSS feed.

I’ll have another look at it, but I think it may be  
too general purpose for me.

I am looking for a single-purpose, 20-liner (maybe by using  
Weirich’s Builder?) that I’ll be able to understand within  
a couple minutes 3 years from now… 🙂

Regards,

---

<div class="post-metadata">

**Author:** ![Bil\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Post date:** [February 16, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900/4 "2006-02-16T22:46:41Z")

</div>

Bil K. wrote:

> I am looking for a single-purpose, 20-liner (maybe by using  
> Weirich’s Builder?) that I’ll be able to understand within  
> a couple minutes 3 years from now… 🙂

Here you go. This is exactly what you’re looking for. Hope you are  
well. Say hi to your mom for me!

\_why

---

<div class="post-metadata">

**Author:** ![Bil\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Post date:** [February 18, 2006, 4:05am UTC](https://www.ruby-forum.com/t/file-exist-svn2rss-rb/53900/5 "2006-02-18T04:05:55Z")

</div>

Hi,

In [dt2qce$msj$removed\_email\_address@domain.invalid](mailto:dt2qce$msj$removed_email_address@domain.invalid)  
“Re: File.exist? svn2rss.rb” on Fri, 17 Feb 2006 06:23:39 +0900,  
Bil K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am looking for a single-purpose, 20-liner (maybe by using  
> Weirich’s Builder?) that I’ll be able to understand within  
> a couple minutes 3 years from now… 🙂

Here is another one. It uses RSS::Maker.  
But… this has 190 lines…

Usage:  
% svn2rss.rb REPOS\_PATH REVISION   
–name YOUR\_REPOSITORY\_NAME\_OPTIONAL   
–repository-uri [http://YOUR.REPOSITORY/URI](http://YOUR.REPOSITORY/URI)   
–rss-path /OUTPUTTED/RSS/PATH.rdf   
–rss-uri [http://OUTPUTTED/RSS/URI.rdf](http://OUTPUTTED/RSS/URI.rdf)

Thanks,
