importing and syncing contents with feeds module

21
Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis Importing and syncing contents with Feeds module By Mihail Shahov

Upload: michael-shahov

Post on 11-Apr-2017

93 views

Category:

Internet


3 download

TRANSCRIPT

Page 1: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Importing and syncing contents with Feeds module

By Mihail Shahov

Page 2: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

About me> Mihail Shahov ( ShaxA )

> PHP Developer since 2009

> Senior Drupal Developer at FFW

> Soon Acquia certificated Drupal developer

> Will be co-lector with Vasil Boychev for Drupal course starting January 2016.

Page 3: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Basic description and use cases>Purpose

>To get large sets of data from outside your site … into your site!

>Use cases>Build Activity streams using feeds from Twitter, Facebook, Linkedin

or etc.>Batch import sets of nodes, terms and users from a file or third

party sites> Import of Commerce Products or simply updating stock levels for

them>Whatever your imagination wants to import

Page 4: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 5: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

FETCHER

PARSER

PROCESSOR

IMPORTER

Page 6: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 7: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

FETCHER

PARSER

PROCESSOR

Where should I get the data from?

How would I read and interpret the data?

What should I do with the data?

File upload, external RSS feed, etc.

CSV, XLS, XML, RSS, etc.

Create nodes, users, terms, etc.

Page 8: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 9: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Fetchers>File upload>HTTP Fetcher

>Directory fetcher>OAuth>Clients Fetcher>SOAP / WDSL

More: https://www.drupal.org/node/856644

Page 10: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 11: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Parsers>RSS>XML>CSV

>XPath>Flickr, YouTube, Vimeo, Pinterest, Slideshare>JSON>Clients parser

More: https://www.drupal.org/node/856644

Page 12: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 13: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Processors>Node>Taxonomy>User

>Comment>Commerce product

More: https://www.drupal.org/node/856644

Page 14: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 15: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

MappingSource

TargetProvided from parser Provided from processor

Eaxmples“title” column in CSV Node title

<ArticleContent> in XML Article body

Page 16: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Feeds Tamper>Replace every instance of a word>Filter items based on keywords or vocabularies>Make every letter uppercase, lowercase, or capitalize every first letter>Break a comma separated list of words into Taxonomy terms or a multivalued text field>Combine separate 'firstname' and 'lastname' fields into one 'name' field>Convert urls from relative to absolute>Many more

Page 17: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Common problems>Avoiding duplicate data>You need good data for import>Data formatting>Character encoding>CSV, Spreadsheets>Broken urls

Page 18: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Feeds pluginsFeeds is using the Ctools plugin system- Fetcher plugins- Parser plugins- Processor plugins

Write your own plugin - each of the three main plugins extends FeedsPlugin class and then they are extended by other classes.

Extend the plugins to meet your requirements

Page 19: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 20: Importing and syncing contents with feeds module

Formerly known as Bysted, Propeople, Blink Reaction, Chainbizz and Geekpolis

Page 21: Importing and syncing contents with feeds module

Thank youWe can meet again soon!!!