print_epub_phpepub.drush.inc 700 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Provides drush integration for print_epub_phpepub module.
  5. */
  6. /**
  7. * The EPUB project download URL.
  8. */
  9. // URI to the the latest PHPePub version.
  10. define('PHPEPUB_DOWNLOAD_URI', 'https://api.github.com/repos/Grandt/PHPePub/releases/latest');
  11. /**
  12. * Implements hook_drush_command().
  13. */
  14. function print_epub_phpepub_drush_epub_libs_alter(&$epub_libs) {
  15. $epub_libs['phpepub'] = array(
  16. 'callback' => '_print_epub_phpepub_drush_download_url',
  17. );
  18. }
  19. /**
  20. * Discover the correct URL of the package to download.
  21. *
  22. * @return string
  23. * URL of the file to download, FALSE if not known
  24. */
  25. function _print_epub_phpepub_drush_download_url() {
  26. return PHPEPUB_DOWNLOAD_URI;
  27. }