Arc Forumnew | comments | leaders | submitlogin
RSS Feeds in Arc
2 points by wfarr 6104 days ago | 3 comments
One of my pet peeves thus far with Arc has been the generally poor RSS feeds one must produce with it.

It's not that most of the content can't be done, but rather that because Arc does not yet (to my knowledge) have the necessary tools to create valid publish dates for entries, that feed readers on the initial fetch assign the same time of day to all posts fetched, and thus, put them out of order.

However, I don't know the MZScheme internals, nor date/time calculations, well enough in order to support creating proper publish dates.

Is anyone interested at taking a go at it, so a fix can be pushed to Anarki?



2 points by kens 6103 days ago | link

I'm not sure I understand your RSS feed question. If you want to create date stamps in the proper RSS / RFC822 format, I think what you want to use is SRFI-19: http://srfi.schemers.org/srfi-19/srfi-19.html

  arc> :a
  > (require (lib "19.ss" "srfi"))
  > (date->string (current-date) "~a, ~d ~b ~Y ~H:~M:~S GMT")
  "Fri, 11 Apr 2008 15:45:39 GMT"
The require statement loads SRFI-19 into MzScheme. The string with ~'s specifies the output format.

Instead of (current-date), you can use (make-time time-utc 0 1207956960), using whatever seconds since 1970 time you want in place of 1207956960. There maybe needs to be a time zone correction in there.

-----

1 point by wfarr 6101 days ago | link

Thanks.

Also "~z" addresses the time-zone issue.

-----

1 point by offby1 6102 days ago | link

http://code.google.com/p/rudybot/source/browse/trunk/planet-... might have a relevant bit of code, around line 110

-----