function drush_tripal_pub_trp_import_pubs

2.x tripal_pub.drush.inc drush_tripal_pub_trp_import_pubs()

Imports publications into Chado

Related topics

1 call to drush_tripal_pub_trp_import_pubs()
drush_tripal_pub_tripal_pubs_import in tripal_pub/tripal_pub.drush.inc
DEPRECATED. Imports publications into Chado

File

tripal_pub/tripal_pub.drush.inc, line 107
Contains function relating to drush-integration of this module.

Code

function drush_tripal_pub_trp_import_pubs() {
  $create_contacts = drush_get_option('create_contacts');
  $dbxref = drush_get_option('dbxref');
  $do_report = drush_get_option('report');
  $update = drush_get_option('update');
  $uname = drush_get_option('username');
  drush_tripal_core_set_user($uname);

  if ($update == 'Y') {
    $update = TRUE;
  }
  else {
    $update = FALSE;
  }

  if ($dbxref) {
    tripal_import_pub_by_dbxref($dbxref, $create_contacts, $update);
  }
  else {
    tripal_execute_active_pub_importers($do_report, $update);
  }
}