This document discusses how to use the Feeds module in Drupal to import and synchronize content from various sources. Feeds allows importing content like nodes, users, taxonomy from RSS, CSV, XML and JSON feeds. It provides fetchers to access remote sources, parsers to interpret different formats, and processors to save content as Drupal entities. Examples demonstrated include importing Flickr photos and keeping RSS feeds in sync. The document also covers using Feeds with Commerce products, tampering to modify field values, and enabling real-time updates via PubSubHubbub.
1 of 56
More Related Content
Importing and synchronizing content using Feeds
1. 7
drupal
Importing and syncing
content using Feeds
Peter Vanhee
2nd October 2011 - DrupalCamp Spain
2. Who am I?
Consumer and contributor to Drupal for
over 5 years
Co-founder Youth Agora @youthagora
and Nuvole @nuvoleweb
Web consultant in Barcelona @pvhee
13. Fetcher
Http
File upload
A complete list is at http://drupal.org/node/856644
14. Parser
CSV, RSS1, RSS2, Atom
OPML, Sitemap XML
XPath for XML/HTML
JSONPath for JSON
YouTube, Flickr, 際際滷share
iCal
A complete list is at http://drupal.org/node/856644
15. Processor
Node
User
Taxonomy
Commerce Products
A complete list is at http://drupal.org/node/856644
43. Enter Tampering
Input Field Output Field
explode
drupal feeds sevilla drupal
feeds
sevilla
html_encode
Me</a>posted a <a href=.>Me</a>
photo:</p> posted a photo
48. Importing Big Stuff
Feeds has Batch support
Feeds can run on cron jobs in the
background
49. Field support
Text Email
File Multimedia
Image Address
Link
Geo鍖eld
Taxonomy Tip: check Feeds issue
Password queues for patches
Date
Integer
50. Feeds as a Framework
Supports import/sync of Commerce
Products (via Commerce Feeds)
Straightforward to add custom fetchers,
patchers and processors using Feed
hooks (check feeds.api.php)
51. Finally...
when not to use Feeds
Content does not need to be stored by
Drupal
Complex content migration tasks
52. Now... Real-Time?
Are we there yet?
Are we there yet?
Are we there yet?
Publisher Subscriber
Yes. Here you are.
Are we there yet?
際際滷 taken from @alexb presentation on Feeds
53. Enter PubSubHubBub
Publisher Hub Subscriber
What does this solve?
1. Noti鍖cations to Subscribers managed by Hub
2. Send only what is changed and when it gets
changed
54. Euhm.. so what does
Feeds do exactly?
Feeds makes Drupal a PSHB
Subscriber
Update feeds in real-time from PSHB Hubs
e.g. Blogger, Wordpress, Superfeedr, ...