ZoteroCopy {c2z}R Documentation

Copy collections and items from a Zotero library

Description

Replace key identifiers with new ones while keeping existing structure and relationship between collections and items

Usage

ZoteroCopy(
  zotero,
  copy.collections = TRUE,
  copy.items = TRUE,
  copy.extras = TRUE,
  remove.missing = TRUE,
  change.library = FALSE,
  copy.user = TRUE,
  copy.id = NULL,
  copy.api = NULL,
  silent = FALSE
)

Arguments

zotero

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

copy.collections

Try to copy specified collections, Default: TRUE

copy.items

Try to copy specified items?, Default: TRUE

copy.extras

Try to copy specified extras (i.e., attachments and notes)?, Default: TRUE

remove.missing

Deleted missing extras, Default: TRUE

change.library

Stage changing of library (e.g., from a group to a personal library), Default: FALSE

copy.user

New user type (The functions will use 'group' as prefix if FALSE), Default: TRUE

copy.id

New id, Default: NULL

copy.api

New API key, Default: NULL

silent

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

Details

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

Value

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

See Also

GET mutate, case_when, filter, select, across, arrange pmap all_of

Examples


  # Fetching collections and items from default group
  zotero = Zotero(
    user = FALSE,
    id = "4827927",
    api = "RqlAmlH5l1KPghfCseAq1sQ1",
    library = TRUE
  )

  # Display collections
  if (any(nrow(zotero$collections))) {
    zotero$collections |>
      dplyr::select(key, version, parentCollection) |>
      print(width = 80)
  }

  # Display items
  if (any(nrow(zotero$items))) {
    zotero$items |>
      dplyr::select(key, version) |>
      print(width = 80)
  }

  # Copy items
  example <- ZoteroCopy(
    zotero,
  )

  # Display collections
  if (any(nrow(example$collections))) {
    example$collections |>
      dplyr::select(key, version, parentCollection) |>
      print(width = 80)
  }

  # Display items
  if (any(nrow(example$items))) {
    example$items |>
      dplyr::select(key, version) |>
      print(width = 80)
  }


[Package c2z version 0.2.0 Index]