Skip to content

Add wget download script helper function Β #198

@dmullen17

Description

@dmullen17

Add a helper function that does something similar to this script:

pkg <- get_package(adc, 'resource_map_doi:10.5065/D61J97TT', file_names = T)
pid_to_wget <- function(pid) {
  return(paste0('wget --no-check-certificate 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')

A couple more details are available here: NCEAS/arcticdatautils#145

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions