You are here

function feedapi_drush_command in FeedAPI 6

Implementation of hook_drush_command().

File

./feedapi.drush.inc, line 30
Drush commands for FeedAPI.

Code

function feedapi_drush_command() {
  $options['--type'] = 'The node type of the feed. Default value: feed, the built-in content-type of FeedAPI.';
  $items['feedapi create'] = array(
    'callback' => 'feedapi_drush_create',
    'description' => dt('Creates a feed'),
    'options' => $options,
    'arguments' => array(
      'url' => 'A feed URL. Mandatory.',
    ),
  );
  $items['feedapi refresh'] = array(
    'callback' => 'feedapi_drush_refresh',
    'description' => dt('Refreshes a feed'),
    'arguments' => array(
      'feed' => 'A feed URL or node nid. Mandatory.',
    ),
  );
  $items['feedapi parse'] = array(
    'callback' => 'feedapi_drush_parse',
    'description' => dt('Parses a feed and outputs the result to the stdout'),
    'options' => $options,
    'arguments' => array(
      'url' => 'A feed URL. Mandatory.',
      'parser' => 'The name of the parser. Mandatory.',
    ),
  );
  $items['feedapi config'] = array(
    'callback' => 'feedapi_drush_config',
    'description' => dt('Shows the config of a given parser or processor'),
    'options' => $options,
    'arguments' => array(
      'name' => 'The name of the parser or the processor. Mandatory.',
    ),
  );
  return $items;
}