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
File
- tripal_core/
tripal_core.drush.inc, line 43 - Contains function relating to drush-integration of this module.
Code
function tripal_core_drush_command() {
$items = array();
// Materialized Views
$items['tripal-mview-update'] = array(
// used by drush help
'description' => dt('Updates the specified materialized view.'),
'arguments' => array(
'mview_id' => dt('The ID of the materialized view to update'),
'table_name' => dt('The name of the materialized view table to update.'),
),
'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'
),
// supply options
'options' => array(
'mview_id',
'table_name'
),
'aliases' => array('trpmv-up', 'tripal-update-mview')
);
// Jobs
$items['tripal-jobs-current'] = array(
'description' => dt('Returns details about the currently running tripal job including percent complete.'),
'arguments' => array(
),
'examples' => array(
'Standard example' => 'drush tripal-jobs-current',
),
'aliases' => array('trpjob-cur', 'tripal-current-job'),
);
$items['tripal-jobs-launch'] = array(
// used by drush help
'description' => dt('Lauches any jobs waiting in the queue.'),
'examples' => array(
'Normal Job' => 'drush tripal-jobs-launch admin',
'Parallel Job' => 'drush tripal-jobs-launch admin --parallel=1'
),
'arguments' => array(
'user' => dt('The Drupal username under which the job should be run. The permissions for this user will be used.'),
),
// supply options
'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', 'tripal-launch-jobs')
);
$items['tripal-jobs-rerun'] = array(
// used by drush help
'description' => dt('Rerun any job in the queue.'),
'examples' => array(
'Normal Job' => 'drush tripal-jobs-rerun admin 2',
'Parallel Job' => 'drush tripal-jobs-rerun admin 2 --parallel=1'
),
'arguments' => array(
'user' => 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.'),
),
// supply options
'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', 'tripal-rerun-job')
);
// Chado-specific
$items['tripal-chado-version'] = array(
// used by drush help
'description' => dt('Returns the current version of chado associated with this drupal site.'),
'arguments' => array(
),
'examples' => array(
'Standard Example' => 'drush tripal-chado-version',
),
'aliases' => array('trpchado-ver')
);
$items['tripal-chadotable-desc'] = array(
// used by drush help
'description' => dt('Returns the table description as specified in the Tripal Schema API for the supplied table.'),
'arguments' => array(
'table_name' => dt('The name of the chado table.'),
),
'examples' => array(
'By Table Name' => 'drush tripal-chadotable-desc --table_name=feature'
),
// supply options
'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')
);
// Tripal Node-Module Specific
$items['tripal-node-sync'] = array(
// used by drush help
'description' => dt('Sync\'s chado records with drupal creating nodes for the given chado-centric module.'),
'arguments' => array(
'module' => dt('The name of the chado-centric module to sync.'),
),
'examples' => array(
'By Module' => 'drush tripal-node-sync feature'
),
// supply options
'options' => array(
),
'aliases' => array('trpnode-sync')
);
$items['tripal-node-clean'] = array(
// used by drush help
'description' => dt('Clean-up orphaned Drupal nodes and chado records.'),
'arguments' => array(
'module' => dt('The name of the chado-centric module to clean-up.'),
),
'examples' => array(
'By Table Name' => 'drush tripal-node-clean feature'
),
// supply options
'options' => array(
),
'aliases' => array('trpnode-cln')
);
return $items;
}