chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Egg Atom/RSS feed.


From: Mario Domenech Goulart
Subject: Re: [Chicken-users] Egg Atom/RSS feed.
Date: 15 Feb 2008 17:27:29 -0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hi folks,

On Fri, 15 Feb 2008 19:22:36 +0100 "felix winkelmann" <address@hidden> wrote:

> On Wed, Feb 13, 2008 at 1:00 AM, Leonardo Valeri Manera
> <address@hidden> wrote:
> > Since you're talking of doing work on the wiki and svn and whatnot
> >  during the hackaton and after, how about setting in hooks so you can
> >  setup a feed for egg updates later on?
> >
> >  It'd be dead useful for anyone who (like me) is working to provide
> >  eggs in distro packaging to compete with the big Py, let alone users
> >  :)
> 
> I'll add an RSS feed to the post-commit script (may take a while,
> though).  But how do you want it to look? Eggs are updated very
> frequently so it's easy to miss one. How about a list of updates
> from the last, say, 7 days?

Felix: if you don't want to touch post-commit, I can periodically run
a feed-generator script on galinha (e.g., daily).  Would that be ok,
Leonardo?

Maybe a kludge like the following could be a start (`format-feed'
should actually xmlize the data).


---------------8<--------------

(use posix runcmd nest-tool (srfi 1 13))

(define eggs-repo-path "/home/mario/src/chicken-eggs")
(define feeds-dir "/home/mario/tmp/egg-feeds")
(define log-sep 
"------------------------------------------------------------------------")
(define max-news 10)
(define eggs (map symbol->string (nest-tool:names)))

(define (svnlog egg)
  (change-directory (make-pathname eggs-repo-path egg))
  (filter (compose not string-null?)
          (map string-trim-both
               (string-split-fields log-sep (run < ("svn log -v --limit " 
,max-news))
                                    infix:))))

(define format-feed print)

(define (write-feed egg)
  (with-output-to-file (make-pathname feeds-dir egg "xml")
    (lambda () (for-each format-feed (svnlog egg)))))

(change-directory eggs-repo-path)
(run (svn up))
(for-each write-feed eggs)

--------------->8--------------


Best wishes,
Mario




reply via email to

[Prev in Thread] Current Thread [Next in Thread]