R/onLoad.R

# Seting remote to FALSE allows local operation
.onLoad <- function(libname, pkgname){
  setwd("~")
  remote <- TRUE
  if (remote==TRUE){
    c <- bioacoustica::bioacoustica.authenticate(Sys.getenv("BAUSR"), Sys.getenv("BAPWD"))
    generateProlog(c)
  } else {
    source("~/authenticate.R", local=TRUE)
    generateProlog(c)
    uploadFromProlog(c)
    downloadAnnotations(c)
  }
}
orthoptera-aao/traitBot documentation built on May 24, 2019, 2:07 a.m.