Common Lisp Package: BKNR.RSS

README:

FUNCTION

Public

MAKE-RSS-CHANNEL (NAME TITLE DESCRIPTION PATH &REST ARGS)

Create an RSS channel with the given NAME, TITLE, DESCRIPTION and LINK (all strings) which are the mandatory fields in an RSS channel. Returns the persistent RSS-CHANNEL object that has been created.

RSS-CHANNEL-ARCHIVE (CHANNEL)

Return the channel archive consisting of lists of lists ((MONTH YEAR) ITEM...)

RSS-CHANNEL-CLEANUP (CHANNEL)

[Transaction function wrapper RSS-CHANNEL-CLEANUP invokes a store transaction] Remove expired items from the items list. Can be used to reduce the memory footprint of very high volume channels.

Undocumented

FIND-RSS-CHANNEL (KEY)

Private

ITEM-SLOT-ELEMENT (ITEM SLOT-NAME)

Cheapo helper function to map from a pseudo slot name to an accessor.

RSS-ITEM-XML (ITEM)

Generate RSS XML for ITEM using CXML's unparse functionality.

TX-RSS-CHANNEL-CLEANUP (CHANNEL)

Remove expired items from the items list. Can be used to reduce the memory footprint of very high volume channels.

Undocumented

DAYS-FROM-QUERY-PARAMETER

MONTH-FROM-QUERY-PARAMETER

RENDER-MANDATORY-ELEMENT (CHANNEL ELEMENT)

MACRO

Private

Undocumented

AIF (TEST-FORM THEN-FORM &OPTIONAL ELSE-FORM)

DEFINE-RSS-ITEM-FIELD (FIELD-NAME &KEY (DOCUMENTATION (FORMAT NIL Return the ~(~A~) of the ITEM as a string FIELD-NAME)) MANDATORY)

GENERIC-FUNCTION

Public

RSS-CHANNEL-ARCHIVED-MONTHS (CHANNEL)

Return a list of lists (MONTH YEAR) for which the CHANNEL has archived entries.

RSS-CHANNEL-ITEMS (CHANNEL &KEY DAYS MONTH COUNT ALL)

Return all non-expired items in channel.

RSS-CHANNEL-XML (CHANNEL STREAM)

Generate XML for the current state of RSS channel CHANNEL to STREAM.

RSS-ITEM-AUTHOR (ITEM)

Return the author of the ITEM as a string (optional)

RSS-ITEM-CATEGORY (ITEM)

Return the category of the ITEM as a string (optional)

RSS-ITEM-CHANNEL (ITEM)

Return the channel that the ITEM is published in.

RSS-ITEM-COMMENTS (ITEM)

Return the comments of the ITEM as a string (optional)

RSS-ITEM-DESCRIPTION (ITEM)

Return the description of the ITEM as a string (optional)

RSS-ITEM-ENCLOSURE (ITEM)

Return the enclosure of the ITEM as a string (optional)

RSS-ITEM-ENCODED-CONTENT (ITEM)

Return the content for ITEM in encoded (usually HTML) form as string. (optional)

RSS-ITEM-GUID (ITEM)

Return the guid of the ITEM as a string (optional)

RSS-ITEM-PUB-DATE (ITEM)

The default implementation for the publication date delivers the current system date/time as publication date.

RSS-ITEM-PUBLISHED (ITEM)

Return non-nil if the ITEM is published. Non-published items are not put into generated XML by RSS-CHANNEL-XML.

RSS-ITEM-SOURCE (ITEM)

Return the source of the ITEM as a string (optional)

RSS-ITEM-TITLE (ITEM)

Return the title of the ITEM as a string (optional)

Undocumented

Private

ADD-ITEM (CHANNEL ITEM)

Add ITEM to CHANNEL. May only be called within transaction context.

REMOVE-ITEM (CHANNEL ITEM)

Remove ITEM from CHANNEL. May only be called within transaction context.

SLOT-ACCESSOR

Public

Undocumented

RSS-CHANNEL-TITLE (OBJECT)

SETFRSS-CHANNEL-TITLE (NEW-VALUE OBJECT)

Private

RSS-CHANNEL-MAX-ITEM-AGE (OBJECT)

default maximum item age in days

SETFRSS-CHANNEL-MAX-ITEM-AGE (NEW-VALUE OBJECT)

default maximum item age in days

Undocumented

RSS-CHANNEL-DESCRIPTION (OBJECT)

SETFRSS-CHANNEL-DESCRIPTION (NEW-VALUE OBJECT)

RSS-CHANNEL-LAST-UPDATE (OBJECT)

SETFRSS-CHANNEL-LAST-UPDATE (NEW-VALUE OBJECT)

RSS-CHANNEL-NAME (OBJECT)

SETFRSS-CHANNEL-NAME (NEW-VALUE OBJECT)

RSS-CHANNEL-PATH (OBJECT)

SETFRSS-CHANNEL-PATH (NEW-VALUE OBJECT)

CLASS

Public

RSS-CHANNEL

RSS-CHANNEL models one rss channel. Items are added to a channel by deriving other persistent classes from the mixin class RSS-ITEM. When an object of such a derived class is created, it is automatically added to its RSS channel. Likewise, it is automatically deleted from the channel when it is deleted. The channel that an item is put into is defined by the generic function RSS-ITEM-CHANNEL which needs to be specialized for each item class. The default method of this generic function specifies nil as channel, which results in the creation of a warning message when an object of this class is created. The RSS-ITEM-CHANNEL method may return the channel either as a string or as a channel object. Subclasses of RSS-ITEM should provide methods for some of the generic functions (RSS-ITEM-CHANNEL RSS-ITEM-TITLE RSS-ITEM-LINK RSS-ITEM-DESCRIPTION RSS-ITEM-AUTHOR RSS-ITEM-CATEGORY RSS-ITEM-COMMENTS RSS-ITEM-ENCLOSURE RSS-ITEM-GUID RSS-ITEM-SOURCE). These functions are called when the RSS file for the channel is generated and provide the content in the RSS items. One RSS-ITEM can only be in one channel, which is a restriction that may eventually be removed. The channel object has more required elements than specified by the standard in order to make the generated feed documents more widely accepted.

RSS-ITEM

Mixin class for RSS items. See documentation for class RSS-CHANNEL for an overview.