You are here

function book_copy_drush_command in Book Copy 7.2

Implements hook_drush_command().

File

./book_copy.drush.inc, line 11
Drush integration for Book Copy module.

Code

function book_copy_drush_command() {
  $items['copy-book'] = array(
    'description' => dt('Copy all items in the book outline below an associated node id.'),
    'arguments' => array(
      'nid' => dt('Node id of the item to copy along with everything below it.'),
      'title' => dt('The new title for the copied book / outline'),
    ),
    'aliases' => array(
      'copyb',
    ),
    'examples' => array(
      'drush copy-book 1 "Cool Stuff"' => 'Copy book outline with node id 1 and rename it to Cool Stuff.',
      'drush copyb 10' => 'Copy book ouline with node id 10 and keep the name the same as the original.',
    ),
  );
  return $items;
}