You are here

function print_epub_drush_command in Printer, email and PDF versions 7.2

Implements hook_drush_command().

File

print_epub/print_epub.drush.inc, line 11
Provides drush integration for print_epub module EPUB libraries download.

Code

function print_epub_drush_command() {
  $items = array();
  $epub_libs = array();
  drush_command_invoke_all_ref('drush_epub_libs_alter', $epub_libs);
  $items['print-epub-download'] = array(
    'description' => 'Download and extract a EPUB library.',
    'arguments' => array(
      'library' => dt('The EPUB library to download. Available choices: !libs.', array(
        '!libs' => implode(', ', array_keys($epub_libs)),
      )),
    ),
    'options' => array(
      'path' => dt('A path to the download folder. If omitted Drush will use the default location (@path).', array(
        '@path' => 'sites/all/libraries',
      )),
    ),
    'aliases' => array(
      'epubdl',
    ),
    // No site or config needed.
    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_ROOT,
  );
  return $items;
}