lib_springer_download: Download Resources from link.springer.com.

Description Usage Arguments Author(s) Examples

View source: R/lib_springer_download.R

Description

Downloads pdf and epub files from link.springer.com using wget. It is assumed that you have access to the resources via your library. It also assumes that wget is installed in your system.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lib_springer_download(
  dir,
  doi = NULL,
  chkfiles = TRUE,
  args = "-nc",
  remove_files = TRUE,
  type = c("pdf", "epub", "both"),
  par = TRUE,
  ncores = NULL
)

Arguments

dir

Character string. Directory which contains target files.

doi

Character vector. A vector of Digital Object Identifiers.

chkfiles

Logical. Check available files in dir. If TRUE, the download queue will EXCLUDE dois from available files.

args

Character string. Arguments to pass to wget.

remove_files

Logical. Remove files that do not match the specified file type. BE CAREFUL WITH THIS OPTION AS FILES CAN BE DELETED FROM YOUR SYSTEM.

type

Character string. Type of ebooks to download.

par

Logical. If TRUE, use multiple cores.

ncores

Integer. Number of cores to use if par = TRUE. If unspecified, defaults to detectCores() - 1.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
# Single DOI
doi <- "10.1007/978-0-387-98141-3"
lib_springer_download(
  dir = getwd(),
  doi = doi,
  chkfiles = TRUE,
  type = "both",
  par = FALSE
)
# Vector of DOIs
doi <- c(
  "https://doi.org/10.1007/978-0-387-71762-3",
  "10.1007/978-0-387-98141-3"
)
lib_springer_download(
  dir = getwd(),
  doi = doi,
  chkfiles = TRUE,
  type = "both",
  par = FALSE
)

## End(Not run)

jeksterslabds/jeksterslabRlib documentation built on Jan. 19, 2021, 11:04 a.m.