Created
August 7, 2014 16:54
-
-
Save EclipseGc/a23c888edf29ac191013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$migrate = new Migrator(); | |
$migrate->disabled = FALSE; /* Edit this to true to make a default migrate disabled initially */ | |
$migrate->api_version = 1; | |
$migrate->machine_name = 'drupal_org_planet_feed'; | |
$migrate->admin_title = 'Drupal.org Planet Feed'; | |
$migrate->source = 'xml'; | |
$migrate->destination = 'node'; | |
$migrate->configuration = array( | |
'url' => 'https://www.drupal.org/planet/rss.xml', | |
'item_xpath' => '/rss/channel/item', | |
'item_id_xpath' => 'link', | |
'node_type' => 'article', | |
); | |
$migrate->mapping = array( | |
'title' => array( | |
'value' => 'title', | |
), | |
'body' => array( | |
'value' => 'description', | |
), | |
'body:format' => array( | |
'default' => 'filtered_html', | |
), | |
'status' => array( | |
'default' => '0', | |
), | |
'created' => array( | |
'value' => 'pubDate', | |
), | |
'changed' => array( | |
'value' => 'pubDate', | |
), | |
); | |
$migrate->processors = array( | |
'title' => array( | |
0 => array( | |
'id' => 'appendstr', | |
'configuration' => array( | |
'string' => 'Drupal Planet: ', | |
'position' => 'before', | |
), | |
), | |
), | |
'created' => array( | |
0 => array( | |
'id' => 'strtotime', | |
'configuration' => array(), | |
), | |
), | |
'changed' => array( | |
0 => array( | |
'id' => 'strtotime', | |
'configuration' => array(), | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment