Portability | portable |
---|---|
Stability | experimental |
Maintainer | Bjorn Bringert <bjorn@bringert.net> |
A libary for generating RSS 2.0 feeds.
Original module by Jeremy Shaw.
Changes by Bjorn Bringert:
- showXml just converts the RSS to a String, does not print it.
- Added XML escaping.
- Use RFC 2822 format for dates.
- Added all elements from RSS 2.0.1-rv-6, http://www.rssboard.org/rss-2-0-1-rv-6
- Use HaXml.Verbatim instead of HaXml.Pretty, since HaXml.Pretty seems to introduce spaces around entities.
- Removed the use of content:encoded, since the description tag is the recommented way to include HTML content in RSS 2.0.
- data RSS = RSS Title Link Description [ChannelElem] [Item]
- type Item = [ItemElem]
- data ChannelElem
- = Language String
- | Copyright String
- | ManagingEditor Email
- | WebMaster Email
- | ChannelPubDate CalendarTime
- | LastBuildDate CalendarTime
- | ChannelCategory (Maybe Domain) String
- | Generator String
- | Cloud CloudHost CloudPort CloudPath CloudProcedure CloudProtocol
- | TTL Minutes
- | Image URI Title Link (Maybe Width) (Maybe Height) (Maybe Description)
- | Rating String
- | TextInput Title Description InputName Link
- | SkipHours [Hour]
- | SkipDays [Day]
- data ItemElem
- type Title = String
- type Link = URI
- type Description = String
- type Width = Int
- type Height = Int
- type Email = String
- type Domain = String
- type MIME_Type = String
- type InputName = String
- type Hour = Int
- type Minutes = Int
- type CloudHost = String
- type CloudPort = Int
- type CloudPath = String
- type CloudProcedure = String
- data CloudProtocol
- rssToXML :: RSS -> CFilter ()
- showXML :: CFilter () -> String
Documentation
data ChannelElem Source
type Description = StringSource
type CloudProcedure = StringSource