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)

Trump Says He’ll Delay Speech Until After Shutdown, as Democrats Draft Border Security Plan
Thu, 24 Jan 2019 07:11:49 GMT nil

Democratic leaders said they were prepared to match the amount requested by President Trump, but only if the money was used for security measures like drones and refitted ports of entry — not a wall.


The State of the Union Is … : The Yearly Address, Explained
Thu, 24 Jan 2019 04:45:33 GMT nil

Here’s what we know about the precedent for the address — and what might happen next.


They Build Spacecraft and Fight Epidemics for America. The Shutdown May Scare Them Away.
Thu, 24 Jan 2019 10:00:07 GMT nil

As the shutdown slogs on, scientists, engineers and other high-skilled civil servants are starting to question the appeal of government work.


Rendered in 112 milliseconds. Used 175 KB of memory, 149 KB for Lisp Cells.