function tripal_core_drush_command

2.x tripal_core.drush.inc tripal_core_drush_command()
3.x tripal_core.drush.inc tripal_core_drush_command()
1.x tripal_core.drush.inc tripal_core_drush_command()

Registers a drush command and constructs the full help for that command.

Return value

And array of command descriptions

Related topics

File

legacy/tripal_core/tripal_core.drush.inc, line 47
Contains function relating to drush-integration of this module.

Code

function tripal_core_drush_command() {
  $items = array();

  $items['trp-clean-nodes'] = array(
    'description' => dt('Removes orphaned Drupal nodes.'),
    'arguments' => array(),
    'examples' => array(
      'Standard Example' => 'drush trp-clean-nodes table=feature'
    ),
    'options' => array(
      'table' => array(
        'description' => dt('The name of the table that corresonds to the node type to ' .
          'clean up. (e.g organism, feature, stock, library, analysis, pub, etc.)'),
        'required' => TRUE,
      ),
    ),
  );

  // DEPRECATED COMMANDS. Deprecated as of Tripal v2.0-rc
  $items['tripal-mview-update'] = array(
    'description' => dt('DEPRECATED. Please see: trp-refresh-mview.'),
    'arguments' => array(),
    'examples' => array(
      'By Materialized View ID' => 'drush tripal-update-mview --mview_id=5',
      'By Table Name' => 'drush tripal-update-mview --table_name=organism_feature_count'
    ),
    'options' => array(
      'mview_id' => dt('The ID of the materialized view to update'),
      'table_name' => dt('The name of the materialized view table to update.'),
    ),
    'aliases' => array('trpmv-up')
  );
  $items['tripal-jobs-current'] = array(
    'description' => dt('DEPRECATED. Please see: trp-get-currjob.'),
    'arguments' => array(),
    'examples' => array(
      'Standard example' => 'drush tripal-jobs-current',
    ),
    'aliases' => array('trpjob-cur'),
  );
  $items['tripal-jobs-launch'] = array(
    'description' => dt('DEPRECATED. Please see: trp-run-jobs. '),
    'examples' => array(
      'Normal Job' => 'drush tripal-jobs-launch admin',
      'Parallel Job' => 'drush tripal-jobs-launch admin --parallel=1'
    ),
    'arguments' => array(
      'username' => dt('The Drupal username under which the job should be run.  The permissions for this user will be used.'),
    ),
    'options' => array(
      'parallel' => dt('Normally jobs are executed one at a time. But if you are certain no conflicts will occur with other currently running jobs you may set this argument to a value of 1 to make the job run in parallel with other running jobs.'),
      'job_id' => dt('Provide a job_id to run a specific job. Only jobs that have not been run already can be used'),
    ),
    'aliases' => array('trpjob-run')
  );
  $items['tripal-jobs-rerun'] = array(
    'description' => dt('DEPRECATED. Please see: trp-rerun-job. '),
    'examples' => array(
      'Normal Job' => 'drush tripal-jobs-rerun admin 2',
      'Parallel Job' => 'drush tripal-jobs-rerun admin  2 --parallel=1'
    ),
    'arguments' => array(
      'username' => dt('The Drupal username under which the job should be run.  The permissions for this user will be used.'),
      'job_id' => dt('The job ID to run.'),
    ),
    'options' => array(
      'parallel' => dt('Normally jobs are executed one at a time. But if you are certain no conflicts will occur with other currently running jobs you may set this argument to a value of 1 to make the job run in parallel with other running jobs.'),
    ),
    'aliases' => array('trpjob-rerun')
  );
  $items['tripal-chado-version'] = array(
    'description' => dt('DEPRECATED. Please see: trp-get-cversion. '),
    'arguments' => array(),
    'examples' => array(
      'Standard Example' => 'drush tripal-chado-version',
    ),
    'aliases' => array('trpchado-ver')
  );
  $items['tripal-chadotable-desc'] = array(
    'description' => dt('DEPRECATED. Please see: trp-get-table. '),
    'arguments' => array(
      'table_name' => dt('The name of the chado table.'),
    ),
    'examples' => array(
      'By Table Name' => 'drush tripal-chadotable-desc --table_name=feature'
    ),
    'options' => array(
      'section' => dt('Only return the specified section of the schema table description. Possible sections include: description, fields, primary key, unique keys, foreign keys, indexes, referring_tables.'),
    ),
    'aliases' => array('trpschema-tbl')
  );
  $items['tripal-node-clean'] = array(
    'description' => dt('DEPRECATED. Please see: trp-clean-nodes.'),
    'arguments' => array(
      'module' => dt('The name of the chado-centric module to clean-up.'),
    ),
    'examples' => array(
      'By Table Name' => 'drush tripal-node-clean feature'
    ),
    'options' => array(),
    'aliases' => array('trpnode-cln')
  );

  return $items;
}