Skip to contents

Export Zotero items to a specified format (e.g., BibLaTeX) using a CSL format (e.g., APA7)

Usage

ZoteroExport(
  zotero,
  csl.type = NULL,
  csl.name = "style",
  locale = "en-US",
  format = "biblatex",
  bib.name = "references",
  save.data = FALSE,
  save.path = NULL,
  silent = FALSE
)

Arguments

zotero

A list with information on the specified Zotero library (e.g., id, API key, collections, and items)

csl.type

Specify a CSL type to Official repository for Citation Style Language (CSL), Default: NULL

csl.name

Name of saved CSL file, Default: 'style'

locale

Desired language format of bibliography, Default: 'en-US'

format

Export format of Zotero items, Default: 'biblatex'

bib.name

Name of exported bibliography, Default: 'references'

save.data

Save data (e.g., bibliography) to disk, Default: FALSE

save.path

Location to store data on disk, Default: NULL

silent

c2z is noisy, tell it to be quiet, Default: FALSE

Value

A list with information on the specified Zotero library (e.g., exported items, bibliography and citations)

Details

Please see https://oeysan.github.io/c2z/

See also

Examples

# \donttest{
  # Define Zotero list according to default group
  zotero = Zotero(
    user = FALSE,
    id = "4827927",
    api = "RqlAmlH5l1KPghfCseAq1sQ1",
    item.type = "-attachment || note",
    max.result = 1,
    library = TRUE
  )
#> Searching for collections 
#> Found 5 collections 
#> The Zotero list contains: 5 collections, 0 items, and 0 attachments 
#> Searching for all items in library 
#> Found 3 items 
#> The provided query is limited to 1 result 
#> The Zotero list contains: 5 collections, 1 item, and 0 attachments 

  # Export 1 items from the default group
  example <- ZoteroExport(
    zotero
  )
#> Found 1 `biblatex` reference 
  # Display exported
  cat(example$export, fill = 80)
#> 
#> @incollection{faldet_vygotsky_2023,
#> 	location = {Oslo},
#> 	title = {Vygotsky med {VR}-briller},
#> 	isbn = {9788202811501},
#> 	url = {https://doi.org/https://doi.org/10.23865/noasp.191},
#> 	pages = {197--216},
#> 	booktitle = {Læring i et Vygotsky-perspektiv: muligheter og konsekvenser for opplæringen},
#> 	publisher = {Cappelen Damm akademisk},
#> 	author = {Somby, Hege Merete and Stalheim, Odd Rune},
#> 	editor = {Faldet, Ann-Cathrin and Skrefsrud, Thor-André and Somby, Hege Merete},
#> 	urldate = {2024-02-17},
#> 	date = {2023},
#> 	langid = {nynorsk},
#> 	doi = {10.23865/noasp.191},
#> 	note = {{NVI}: 1
#> Cristin: 2160921},
#> }
#> 
# }