R/cristin_web.R
CristinWeb.Rd
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()
)
Data containing monthly information from Cristin.
Data containing information about Sustainable Development Goals (SDGs). Default is NULL.
Path to SDG images. Default is NULL.
Relative URL to archive. Default is NULL.
Path to local storage directory. Default is NULL.
Logical, indicating whether to update user information from INN. Default is TRUE.
Logical, indicating whether to perform a full update of user information from INN. Default is FALSE.
Language for localization ("nb", "nn", "no", or "en"). Defaults to "nn".
Logical, indicating whether to suppress log messages. Default is FALSE.
List to store log messages. Default is an empty list.
A tibble containing metadata and HTML content for web display.
Used with `CristinMonthly` to create month-to-month bibliography in markdown format
# \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
# }