Hi folks,

On Fri, 15 Feb 2008 19:22:36 +0100 "felix winkelmann" <[EMAIL PROTECTED]> wrote:

> On Wed, Feb 13, 2008 at 1:00 AM, Leonardo Valeri Manera
> <[EMAIL PROTECTED]> 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


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to