Skip to content

Download script  #145

@dmullen17

Description

@dmullen17

@jeanetteclark @amoeba what do you think about adding a helper function that does something similar to this? This is just a script I modify from time to time so it's not very clean.

pkg <- get_package(adc, 'resource_map_doi:10.5065/D61J97TT', file_names = T)
pid_to_wget <- function(pid) {
  return(paste0('wget https://arcticdata.io/metacat/d1/mn/v2/object/', pid, ' -O ', names(pid), '\n'))
}

pids <- c(pkg$metadata, pkg$data)
text <- vector('character', length(pids))
for (i in seq_along(pids)) {
  text[i] <- pid_to_wget(pids[i])
}
formatted_text <- paste0(text, collapse = '')
write(formatted_text, file = '/home/dmullen/Submissions/Merrelli/download.sh')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions