zotFunc downloads complete Zotero group libraries and
keeps the local copies up to date. This page covers the two calls you
need most. See vignette("detailed-usage") for everything
else.
Download a group
Every Zotero group has a numeric id. It is the number in the group’s
URL, for example
https://www.zotero.org/groups/4937409/nature_futures_framework.
get_group(4937409, path = "nff", output_format = "bibtex")
#> Downloading records 1 to 100 ...
#> Downloading records 101 to 374 of 374 ...
#> [1] "nff"The total (374) is only known after the first page. The
remaining pages are then downloaded in parallel, up to four at a
time.
The folder now holds one file per 100 records, plus four files describing the download:
list.files("nff", all.files = TRUE, no.. = TRUE)
#> [1] ".format" ".id" ".name" ".version"
#> [5] "bibtex_0.bib" "bibtex_100.bib" "bibtex_200.bib" "bibtex_300.bib"Update it
The folder knows its group and format, so the folder is all you need. Nothing is downloaded unless the group changed on the server:
get_group(path = "nff")
#> Group 4937409 in `nff` is up to date - nothing downloaded.
#> [1] "nff"Run this as often as you like, for example in a scheduled script.