write_bib: Export Zotero library items to bibliography file

View source: R/items.R

write_bibR Documentation

Export Zotero library items to bibliography file

Description

Writes a file of the chosen bibliography format to path with items belonging to a Zotero user or group library, optionally limited to a specific collection.

Usage

write_bib(
  collection_key = NULL,
  incl_children = TRUE,
  path,
  format = "bibtex",
  modified_since = NULL,
  ...
)

Arguments

collection_key

Collection key, see collections(). If NULL, all items in the library are returned.

incl_children

Whether or not to include child items from sub-collections beneath the collection_key's or the library's (if collection_key = NULL) top level.

path

Path to file.

format

Bibliographic data format used for export. One of:

  • "bibtex",

  • "biblatex",

  • "csljson",

  • "mods",

  • "refer",

  • "rdf_bibliontology",

  • "rdf_dc",

  • "rdf_zotero",

  • "ris",

  • "wikipedia"

For details, see the relevant Zotero documentation.

modified_since

Optional Zotero library version number. If the Zotero library's content hasn't changed since the specified version number, nothing will be written to path (and the performed API request will be significantly faster). See section Caching in zotero_api() for further details.

...

Other arguments passed to zotero_api()

Value

A character scalar of the Zotero Library items in the specified format, invisibly.

Note that it is of length 0 if the Zotero library's content hasn't changed since the version number specified in modified_since. Otherwise it has a version attribute set to the Zotero library version number returned by the API.

See section Caching in zotero_api() for further details.

See Also

Other Zotero items functions: add_archive_url(), as_item_tibble(), items()


mbojan/zoterro documentation built on Oct. 18, 2023, 12:10 p.m.