This function generates HTML and metadata files for web display using data from Cristin.

CristinWeb(
  monthlies,
  sdg.data = NULL,
  sdg.path = NULL,
  archive.url = NULL,
  local.storage = NULL,
  user.cards = TRUE,
  full.update = FALSE,
  lang = "nn",
  silent = FALSE,
  log = list()
)

Arguments

monthlies

Data containing monthly information from Cristin.

sdg.data

Data containing information about Sustainable Development Goals (SDGs). Default is NULL.

sdg.path

Path to SDG images. Default is NULL.

archive.url

Relative URL to archive. Default is NULL.

local.storage

Path to local storage directory. Default is NULL.

user.cards

Logical, indicating whether to update user information from INN. Default is TRUE.

full.update

Logical, indicating whether to perform a full update of user information from INN. Default is FALSE.

lang

Language for localization ("nb", "nn", "no", or "en"). Defaults to "nn".

silent

Logical, indicating whether to suppress log messages. Default is FALSE.

log

List to store log messages. Default is an empty list.

Value

A tibble containing metadata and HTML content for web display.

Details

Used with `CristinMonthly` to create month-to-month bibliography in markdown format

Examples

# \donttest{
  # Create monthlies for unit 209.5.10.0
  example <- CristinMonthly(
    c2z::Zotero(
      id = "4827927",
      api = "RqlAmlH5l1KPghfCseAq1sQ1",
      user = FALSE
    ),
    unit.key = "209.5.10.0",
    start.date = "2023-07",
    post = TRUE,
    silent = TRUE
  )
#> Error in c2z::Zotero(zotero = zotero, collection.key = core.location,     search.collections = FALSE, item.type = "-attachment || note",     library = TRUE, silent = silent, force = TRUE, log = zotero$log): unused argument (search.collections = FALSE)

  # Create md files
  example.web <- CristinWeb(
    example$monthlies,
    user.cards = FALSE
  )
#> Error in example$monthlies: object of type 'closure' is not subsettable

  # Print the three first individual pages (if any)
  if (!is.null(example$monthlies)) {
    example$monthlies |>
      dplyr::select(title) |>
      print(n = 3, width = 80)
  }
#> Error in example$monthlies: object of type 'closure' is not subsettable
# }