find_cached_htids | R Documentation |
Finds cached Extracted Features files for a set of HT ids
find_cached_htids(
htids,
dir = getOption("hathiTools.ef.dir"),
cache_type = c("ef", "meta", "pagemeta"),
cache_format = getOption("hathiTools.cacheformat"),
existing_only = TRUE
)
htids |
A character vector of Hathi Trust ids, a workset created with
workset_builder, or a data frame with a column named "htid" containing
the Hathi Trust ids that require caching. If the JSON Extracted Features
files for these htids have not been downloaded via rsync_from_hathi or
get_hathi_counts to |
dir |
The directory where the download extracted features files are to
be found. Defaults to |
cache_type |
Type of information cached. The default is c("ef", "meta",
"pagemeta"), which refers to the extracted features, the volume metadata,
and the page metadata. Omitting one of these caches or finds only the rest
(e.g., |
cache_format |
File format of cache for Extracted Features files.
Defaults to |
existing_only |
Whether to return only file paths to files that actually
exist. Default is |
A tibble with the paths of the cached files and an indicator of whether each htid has an existing cached file.
htids <- c("mdp.39015008706338", "mdp.39015058109706")
dir <- tempdir()
# Finds nothing (nothing has been downloaded or cached to `dir`):
find_cached_htids(htids, cache_format = c("none", "csv"), dir = dir)
cache_htids(htids, dir = dir, cache_type = "ef", attempt_rsync = TRUE)
# Finds the cached files and their JSON ef files
find_cached_htids(htids, cache_format = c("none", "csv"), dir = dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.