R/rsync_tools.R
htid_to_rsync.Rd
Converts a list of htids to relative paths for rsync to download
htid_to_rsync(htids, file)
A character vector of HathiTrust ids (htids), a workset generated by workset_builder, or a data frame with a column named 'htid' and containing the htids.
A text file to save the resulting list of relative stubbytree
paths to use in the command rsync -av --files-from FILE.txt data.analytics.hathitrust.org::features-2020.03/ hathi-ef/
The list of relative paths saved to the file (invisibly).
If you have a lot of files to download, generating the list of relative stubbytree paths and using rsync is much faster than using get_hathi_counts over a list of htids. But rsync only downloads json files, so calling get_hathi_counts on a downloaded json file will be slower the first time as the function will cache the json file to csv or another format. It is best to run cache_htids after using rsync to reduce this performance penalty.