# File.exist? svn2rss.rb

**URL:** <https://rubytalk.org/t/file-exist-svn2rss-rb/24959>\
**Category:** ruby-talk\
**Created:** [16 February 2006 10:38 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959 "2006-02-16T10:38:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BIl\_Kleb1](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@BIl\_Kleb1](https://rubytalk.org/u/BIl_Kleb1)\
**Post date:** [16 February 2006 10:38 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959/1 "2006-02-16T10:38:34Z")

</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,

&nbsp;&nbsp;[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,

> **···**
>
> --  
> Bil  
> [http://fun3d.larc.nasa.gov](http://fun3d.larc.nasa.gov)

---

<div class="post-metadata">

**Author:** ![Kouhei\_Sutou1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/kouhei_sutou1/32/2034_2.png) [@Kouhei\_Sutou1](https://rubytalk.org/u/Kouhei_Sutou1)\
**Post date:** [16 February 2006 16:47 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959/2 "2006-02-16T16:47:04Z")

</div>

Hi,

In \<dt1kml$ebe$1@vilya.larc.nasa.gov\>  
&nbsp;&nbsp;"File.exist? svn2rss.rb" on Thu, 16 Feb 2006 19:38:34 +0900,

> 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.

&nbsp;&nbsp;commit-email.rb \  
&nbsp;&nbsp;&nbsp;&nbsp;"$REPOS" "$REV" your@mail.address \  
&nbsp;&nbsp;&nbsp;&nbsp;-r [http://YOUR.HOST/REPOSITORY/TOP/URI](http://YOUR.HOST/REPOSITORY/TOP/URI) \  
&nbsp;&nbsp;&nbsp;&nbsp;--rss-path /PATH/TO/RSS.rdf \  
&nbsp;&nbsp;&nbsp;&nbsp;--rss-uri [http://YOUR.HOST/URI/OF/RSS.rdf](http://YOUR.HOST/URI/OF/RSS.rdf) \  
&nbsp;&nbsp;&nbsp;&nbsp;... and other options ...

Thanks,

> **···**
>
> Bil Kleb \<Bil.Kleb@NASA.gov\> wrote:  
> --  
> kou

---

<div class="post-metadata">

**Author:** ![BIl\_Kleb1](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@BIl\_Kleb1](https://rubytalk.org/u/BIl_Kleb1)\
**Post date:** [16 February 2006 21:23 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959/3 "2006-02-16T21:23:39Z")

</div>

Kouhei Sutou wrote:

> Hi,

Hello.

> Bil Kleb \<Bil.Kleb@NASA.gov\> 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,

> **···**
>
> --  
> Bil  
> [http://fun3d.larc.nasa.gov](http://fun3d.larc.nasa.gov)

---

<div class="post-metadata">

**Author:** ![why\_the\_lucky\_stiff1](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@why\_the\_lucky\_stiff1](https://rubytalk.org/u/why_the_lucky_stiff1)\
**Post date:** [16 February 2006 21:46 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959/4 "2006-02-16T21:46:13Z")

</div>

Bil Kleb 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

[post-commit](https://rubytalk.org/uploads/short-url/dKW0XjpBLSaBlGV3dXgQV686DON) (4.75 KB)

---

<div class="post-metadata">

**Author:** ![Kouhei\_Sutou1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/kouhei_sutou1/32/2034_2.png) [@Kouhei\_Sutou1](https://rubytalk.org/u/Kouhei_Sutou1)\
**Post date:** [18 February 2006 03:04 UTC](https://rubytalk.org/t/file-exist-svn2rss-rb/24959/5 "2006-02-18T03:04:10Z")

</div>

Hi,

In \<dt2qce$msj$1@vilya.larc.nasa.gov\>  
&nbsp;&nbsp;"Re: File.exist? svn2rss.rb" on Fri, 17 Feb 2006 06:23:39 +0900,

> 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:  
&nbsp;&nbsp;% svn2rss.rb REPOS\_PATH REVISION \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--name YOUR\_REPOSITORY\_NAME\_OPTIONAL \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--repository-uri [http://YOUR.REPOSITORY/URI](http://YOUR.REPOSITORY/URI) \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--rss-path /OUTPUTTED/RSS/PATH.rdf \  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--rss-uri [http://OUTPUTTED/RSS/URI.rdf](http://OUTPUTTED/RSS/URI.rdf)

Thanks,

[svn2rss.rb](https://rubytalk.org/uploads/short-url/kQ8beCtqifuid8OLfuA1Oef7ZCr.rb) (4.11 KB)

> **···**
>
> Bil Kleb \<Bil.Kleb@NASA.gov\> wrote:  
> --  
> kou
