Dragonfly feeds | Dragonfly web framework

Reading feeds from other websites

Dragonfly provides some simple functions for reading atom feeds (RSS will follow). The name Atom applies to a pair of related standards. The Atom Syndication Format is an XML language used for web feeds, while the Atom Publishing Protocol (AtomPub or APP) is a simple HTTP-based protocol for creating and updating web resources. (source: wikipedia.org)

There are two functions in plugins-active/dragonfly_basic.lsp for reading feeds: read-atom-feed and read-rss-feed. They can be used to read feeds server-side. If you want to load a feed on the client's side, use AJAX and Javascript instead for faster page loads and to offload work from the server.

Example: displaying an atom feed

The following will display all of the entries from the atom feed as HTML:

<% (read-atom-feed "http://website.com/atomfeed.xml") %>

If you'd like to limit the number of entries shown:

<% (read-atom-feed "http://website.com/atomfeed.xml" 3) %>

If you want to see the raw XML without limiting the number of entries:

<% (read-atom-feed "http://website.com/atomfeed.xml" nil true) %>

The read-rss-feed function works in the same manner. These functions are used to display the feed below:

NYTimes.com (RSS)

Mueller Finds No Trump-Russia Conspiracy, but Stops Short of Exonerating President on Obstruction
Mon, 25 Mar 2019 01:06:57 GMT nil

The attorney general released the main findings of the closely watched investigation into Russia’s election interference and whether Trump associates conspired.

News Analysis: A Cloud Over Trump’s Presidency Is Lifted
Mon, 25 Mar 2019 01:19:55 GMT nil

The end of the special counsel’s investigation without findings of collusion with Russia fortified the president for the battles to come, including his campaign for re-election.

Trump Declares Victory, and a War on His Enemies
Mon, 25 Mar 2019 04:15:17 GMT nil

Like everyone else in the country, the president had been forced to wait while in Washington, the attorney general pored over the special counsel’s report and decided what to make public.

Rendered in 79 milliseconds. Used 174 KB of memory, 148 KB for Lisp Cells.