OK - I’ve a new version of the FeedGrab plugin ready to release.
A couple of exciting (and slightly scary) new features:
Attributes
You can now access attribute values from feed elements, eg, flickr uses fields like:
<media:content url="http://farm1.static.flickr.com/116/301933412_fad89245a8_o.jpg"
type="image/jpeg"
height="1200"
width="1600"/>
You can now access the url, type, etc attributes using media:content@url, media:content@type at the field name
User defineable ‘uniqueness’
Previously, the plugin always used the title and entry date to determine whether a feed entry already existed in the weblog. Now you can use any (combination) of your weblog fields to test. (Most feeds provide a global unique identifier for each entry - I’d suggest adding a guid field to your weblog and sticking the guid in there.)
The parameter is called unique and takes a comma separated list of weblog fields to test for duplicates.
(Note for those interested: this is my first step towards allowing entries to be updated)
Here’s an example plugin call (to flickr) using the new features:
{exp:feedgrab url="http://api.flickr.com/services/feeds/photos_public.gne?id=YOURIDHERE@N00&format=rss_200"
weblog="2"
title="title"
date="dc:date.Taken"
use="media:content@url|media:thumbnail@url|guid"
fields="feeds_url|feeds_thumbnail|feeds_guid"
unique="feeds_guid" }
There’s also a debug="off" parameter that stops the plugin reporting what it is doing, if you would like it to run silently.
Edit: Please see the FeedGrab page to download current version