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)

Delay, Deny and Deflect: How Facebook’s Leaders Fought Through Crisis
Thu, 15 Nov 2018 11:30:44 GMT nil

Russian meddling, data sharing, hate speech — the social network faced one scandal after another. This is how Mark Zuckerberg and Sheryl Sandberg responded.


How Facebook Wrestled With Scandal: 6 Key Takeaways From The Times’s Investigation
Thu, 15 Nov 2018 06:02:40 GMT nil

An investigation by The New York Times revealed how Facebook fought back against critics during a flood of crises — with delays, denials and an influence campaign in Washington.


Facebook Cuts Ties With Definers Public Affairs Following Outcry
Thu, 15 Nov 2018 11:36:11 GMT nil

The social network faced scrutiny for working with the consulting firm, which tried to discredit critics and rivals of the Silicon Valley giant.


Rendered in 247 milliseconds. Used 181 KB of memory, 155 KB for Lisp Cells.