function uc_csv_drush_command in Ubercart CSV 7.2
Implementation of hook_drush_command().
File
- ./
uc_csv.drush.inc, line 6
Code
function uc_csv_drush_command() {
$items = array();
$items['uc-csv-export'] = array(
'description' => dt('Run an export and place the exported file in the specified location, or in the same place where the command is called if unspecified.'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
'arguments' => array(
'output-file' => dt('The relative path and file name to where you want the export file placed.'),
),
'options' => array(
'start' => array(
'description' => dt('The start date of when the export should take place (yyyy-mm-dd)'),
'example-value' => '2014-10-01',
),
'end' => array(
'description' => dt('The end date of when the export should end (yyyy-mm-dd)'),
'example-value' => '2014-10-31',
),
'shipping-address' => array(
'description' => dt('Include the shipping address.'),
),
'billing-address' => array(
'description' => dt('Include the billing address.'),
),
'products' => array(
'description' => dt('Include the products.'),
),
'file-type' => array(
'description' => dt('Export type (defaults to csv).'),
),
'order-by' => array(
'description' => dt('How to order the report (defaults to order-id).'),
'example-value' => 'order-id or last-name',
),
'email' => array(
'description' => dt('Optional: The email address to send the finished report to.'),
'example-value' => '--email=test@testing.com',
),
'examples' => array(
'Export With Dates' => 'uc-csv-export export_file.csv --sd=2014-10-01 --ed=2014-10-31',
'Export With Dates/Email' => 'uc-csv-export --sd=2014-10-01 --ed=2014-10-31--email=test@testing.com',
),
'aliases' => array(
'ucce',
),
),
);
$items['uc-csv-export-report'] = array(
'description' => 'Run an export of a specific report (by id)',
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
'arguments' => array(
'of' => dt('The relative path and file name to where you want the export file placed.'),
'id' => dt('The machine ID of the report to be generated'),
),
'options' => array(
'ignore' => array(
'description' => dt('Ignore state of previously exported entries (export all)'),
'example-value' => 'true',
),
),
'examples' => array(
'export report 1' => 'uc-csv-export-report export_file.csv 1',
'export report 1 ignore tracking' => 'uc-csv-export-report export_file.csv 1 --ignore=true',
),
'aliases' => array(
'ucer',
),
);
return $items;
}