Given a vector of Hathi Trust IDs (generated, for example, from
workset_builder), this function attempts to use
rsync to download their Extracted
Features (per-page word counts and part of speech information) files from
Hathi Trust. rsync
needs to be installed in your system and accessible via
system or system2.
rsync_from_hathi(htids, dir = getOption("hathiTools.ef.dir"))
A vector of Hathi Trust IDs, a workset generated by workset_builder, or a data frame with a column named 'htid'.
The directory to save the downloaded EF files to. This defaults to
getOption("hathiTools.ef.dir")
, which is just "./hathi-ef" on loading.
The return code of system or system2 used to run rsync
, which
must be installed on your system.
# \donttest{
res <- workset_builder(c("tylenol", "paracetamol"), volumes_only = FALSE)
rsync_from_hathi(res$htid[1:10], dir = tempdir())
#> [1] 0
# }