function node_export_drush_command in Node export 8
Same name and namespace in other branches
- 6.3 node_export.drush.inc \node_export_drush_command()
- 6.2 node_export.drush.inc \node_export_drush_command()
- 7.3 node_export.drush.inc \node_export_drush_command()
Implements hook_drush_command().
1 call to node_export_drush_command()
- node_export_drush_help in ./
node_export.drush.inc - Implements hook_drush_help().
File
- ./
node_export.drush.inc, line 19 - Drush integration for Node Export module.
Code
function node_export_drush_command() {
$commands['node-export-export'] = [
'callback' => 'drush_node_export_export',
'description' => 'Export nodes using Node export.',
'aliases' => [
'ne-export',
],
'node_export alias for' => "node_export_export",
'arguments' => [
'nids' => "A list of space-separated node IDs to export.",
],
'options' => [
'file' => "The filename of the output file. If supplied, the node code will be exported to that file, otherwise it will export to stdout.",
],
'examples' => [
'drush node-export-export 45 46 47' => "export nodes with node IDs 45, 46, and 47.",
],
];
$commands['node-export-import'] = [
'callback' => 'drush_node_export_import',
'description' => 'Import nodes exported using Node export.',
'aliases' => [
'ne-import',
],
'arguments' => [
'file' => 'File containing exported node code.',
],
'examples' => [
'drush node-export-import "/path/to/file.json"' => 'Import nodes from file located at /path/to/file.json.',
],
];
return $commands;
}