tripal_pub.drush.inc 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @file
  4. * Contains function relating to drush-integration of this module.
  5. */
  6. /**
  7. * Describes each drush command implemented by the module
  8. *
  9. * @return
  10. * The first line of description when executing the help for a given command
  11. */
  12. function tripal_pub_drush_help($command) {
  13. switch ($command) {
  14. case 'drush:tripal-pub-import':
  15. return dt('Imports publications from remote databases using saved configuration settings.');
  16. }
  17. }
  18. /**
  19. * Registers a drush command and constructs the full help for that command
  20. *
  21. * @return
  22. * And array of command descriptions
  23. */
  24. function tripal_pub_drush_command() {
  25. $items = array();
  26. $items['tripal-pub-import'] = array(
  27. 'description' => dt('Imports publications from remote databases using saved configuration settings.'),
  28. 'examples' => array(
  29. 'Standard example' => 'drush tripal-pub-import',
  30. ),
  31. 'aliases' => array('trp-pubs'),
  32. );
  33. return $items;
  34. }
  35. /**
  36. * Imports publications into Chado
  37. *
  38. */
  39. function drush_tripal_pub_import() {
  40. tripal_pub_import_publications();
  41. }