function feeds_drush_command in Feeds 7.2
Implements hook_drush_command().
File
- ./
feeds.drush.inc, line 18 - Drush commands for Feeds module.
Code
function feeds_drush_command() {
$items = array();
$items['feeds-list-importers'] = array(
'description' => 'Get a list of all Feeds importers in the system.',
'aliases' => array(
'feeds',
),
);
$items['feeds-list-feeds'] = array(
'description' => 'List all feed sources.',
'arguments' => array(
'importer' => 'The name of the Feeds importer whose instances will be listed. Optional.',
),
'examples' => array(
'drush feeds-list-feeds' => 'List all instances of all feeds.',
'drush feeds-list-feeds rss_feed' => 'List all feed sources of the rss_feed importer.',
'drush feeds-list-feeds --limit=3' => 'Only list the first three feed sources.',
),
'options' => array(
'limit' => 'Limit the number of feeds to show in the list. Optional.',
),
'aliases' => array(
'feeds-lf',
),
);
$items['feeds-import'] = array(
'description' => 'Imports a feed.',
'arguments' => array(
'importer' => 'The name of the Feeds importer that will be refreshed. Mandatory.',
),
'options' => array(
'nid' => '(optional) The nid of the Feeds importer that will be imported.',
'file' => '(optional) The file to import. Bypasses the configured fetcher and does *not* update the source configuration.',
'url' => '(optional) The URL to import. Bypasses the configured fetcher and does *not* update the source configuration.',
'stdin' => '(optional) Read the file to import from stdin. Bypasses the configured fetcher and does *not* update the source configuration.',
),
'examples' => array(
'drush feeds-import my_importer' => "Import items with the importer 'my_importer'.",
'drush feeds-import my_importer --nid=2' => "Import items with the importer 'my_importer' for feed node 2.",
),
'aliases' => array(
'feeds-im',
),
);
$items['feeds-import-all'] = array(
'description' => 'Import all instances of feeds of the given type.',
'arguments' => array(
'importer' => 'The name of the Feeds importer that will be refreshed. Omitting the importer will cause all instances of all feeds to be imported.',
),
'examples' => array(
'drush feeds-import-all' => 'Import all instances of all feeds.',
'drush feeds-import-all my_importer' => "Import all instances of the importer 'my_importer'.",
'drush feeds-import-all my_importer --limit=10' => "Import 10 instances of the feed 'my_importer'.",
),
'options' => array(
'limit' => 'Limit the number of feeds to import. Optional.',
),
'aliases' => array(
'feeds-ia',
'feeds-im-all',
),
);
$items['feeds-clear'] = array(
'description' => 'Delete all items from a feed.',
'arguments' => array(
'importer' => 'The name of the Feeds importer that will be cleared. Mandatory.',
),
'options' => array(
'nid' => 'The ID of the Feed node that will be cleared. Required if the importer is attached to a content type.',
),
'examples' => array(
'drush feeds-clear my_importer' => "Deletes all items imported with the importer 'my_importer'. The importer must use the standalone import form.",
'drush feeds-clear my_importer --nid=2' => "Deletes all items imported with the importer 'my_importer' for the feed node with ID 2. The importer must be attached to a content type.",
),
);
$items['feeds-enable'] = array(
'description' => 'Enables one or more Feeds importers.',
'arguments' => array(
'importers' => 'A space delimited list of Feeds importers. Mandatory.',
),
'examples' => array(
'drush feeds-enable importer_1 importer_2' => "Enable Feeds importers 'importer_1' and 'importer_2'.",
),
'aliases' => array(
'feeds-en',
),
);
$items['feeds-disable'] = array(
'description' => 'Disable one or more Feeds importers.',
'arguments' => array(
'importers' => 'A space delimited list of Feeds importers. Mandatory.',
),
'examples' => array(
'drush feeds-disable importer_1 importer_2' => "Disable Feeds importers 'importer_1' and 'importer_2'.",
),
'aliases' => array(
'feeds-dis',
),
);
$items['feeds-delete'] = array(
'description' => 'Deletes one or more Feeds importers.',
'arguments' => array(
'importers' => 'A space delimited list of Feeds importers. Mandatory.',
),
'examples' => array(
'drush feeds-delete importer_1 importer_2' => "Delete Feeds importers 'importer_1' and 'importer_2'.",
),
);
$items['feeds-revert'] = array(
'description' => 'Reverts one or more Feeds importers.',
'arguments' => array(
'importers' => 'A space delimited list of Feeds importers. Mandatory.',
),
'examples' => array(
'drush feeds-revert importer_1 importer_2' => "Revert Feeds importers 'importer_1' and 'importer_2'.",
),
);
return $items;
}