rss-3000.0.0: A library for generating RSS 2.0 feeds.ContentsIndex
Text.RSS
Portabilityportable
Stabilityexperimental
MaintainerBjorn Bringert <bjorn@bringert.net>
Description

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.
Synopsis
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
= Title Title
| Link Link
| Description Description
| Author Email
| Category (Maybe Domain) String
| Comments URI
| Enclosure URI Int MIME_Type
| Guid Bool String
| PubDate CalendarTime
| Source URI Title
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
= CloudProtocolXmlRpc
| CloudProtocolSOAP
rssToXML :: RSS -> CFilter
showXML :: CFilter -> String
Documentation
data RSS
Constructors
RSS Title Link Description [ChannelElem] [Item]
show/hide Instances
type Item = [ItemElem]
data ChannelElem
Constructors
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]
show/hide Instances
data ItemElem
Constructors
Title Title
Link Link
Description Description
Author Email
Category (Maybe Domain) String
Comments URI
Enclosure URI Int MIME_Type
Guid Bool String
PubDate CalendarTime
Source URI Title
show/hide Instances
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
Constructors
CloudProtocolXmlRpc
CloudProtocolSOAP
show/hide Instances
rssToXML :: RSS -> CFilter
Converts RSS to XML.
showXML :: CFilter -> String
Render XML as a string.
Produced by Haddock version 0.8