Skip to content

Commit 3ee161f

Browse files
committed
Improve docs
1 parent 719b39d commit 3ee161f

15 files changed

Lines changed: 149 additions & 49 deletions

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
- `cff_write()` gains a new `encoding` argument to make it work with different
7373
encodings. See `iconv()`.
74-
- Fixed **NOTEs** caused by empty lines in docs.
74+
- Fixed **NOTEs** caused by empty lines in documentation.
7575

7676
# cffr 1.0.0
7777

R/as_bibentry.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ as_bibentry.list <- function(x, ...) {
195195
return(bibentry())
196196
}
197197

198-
# Unlist to undo the do.call effect.
198+
# Unlist to undo the `do.call()` effect.
199199
bib <- bib[[1]]
200200

201201
bib
@@ -298,22 +298,22 @@ as_bibentry.cff_ref <- function(x, ...) {
298298
### Journal ----
299299
tobibentry$journal <- x$journal
300300

301-
### note ----
301+
### Note ----
302302
tobibentry$note <- get_bib_note(x)
303303

304304
### Number ----
305305
tobibentry$number <- clean_str(x[["issue"]])
306306

307-
### pages ----
307+
### Pages ----
308308
tobibentry$pages <- clean_str(paste(
309309
unique(c(x$start, x$end)),
310310
collapse = "--"
311311
))
312312

313-
### publisher ----
313+
### Publisher ----
314314
tobibentry$publisher <- clean_str(x$publisher$name)
315315

316-
### title ----
316+
### Title ----
317317
tobibentry$title <- x$title
318318

319319
### Volume ----
@@ -353,7 +353,7 @@ as_bibentry.cff_ref <- function(x, ...) {
353353
# Month ----
354354
tobibentry$month <- get_bib_month(x)
355355

356-
# year ----
356+
# Year ----
357357
tobibentry$year <- get_bib_year(x)
358358

359359
# Handle anonymous authors ----

R/as_cff_reference.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ make_cff_reference <- function(bib) {
1818
# Get BibTeX entry ----
1919
cit_list <- get_bibtex_entry(bib)
2020

21-
## If there is no title (case of some Misc), return null.
21+
## If there is no title (case of some Misc), return `NULL`.
2222
if (!("title" %in% names(cit_list))) {
2323
entry <- capture.output(print(bib, bibtex = FALSE))
2424
entry <- as.character(entry)
@@ -44,7 +44,7 @@ make_cff_reference <- function(bib) {
4444

4545
# Coerce persons ----
4646
# Special case: authors.
47-
# Some keys do not strictly require authors, so create one for cff.
47+
# Some keys do not strictly require authors, so create one for CFF.
4848
# https://github.com/citation-file-format/citation-file-format/blob/main/
4949
# (cont) schema-guide.md#how-to-deal-with-unknown-individual-authors
5050

R/cff_gha_update.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' @inherit cff_git_hook return
1616
#'
1717
#' @details
18-
#' Triggers on your action can be modified. See
18+
#' Workflow triggers can be modified. See
1919
#' ```{r, echo=FALSE, results='asis'}
2020
#'
2121
#' cat(paste0(" [Events that trigger workflows]",

R/deprecated.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ cff_parse_person_bibtex <- function(person) {
289289
#' bib <- citation("base")
290290
#' bib
291291
#'
292-
#' # To cff.
292+
#' # To `cff`.
293293
#' bib_to_cff <- as_cff(bib)
294294
#' bib_to_cff
295295
#'

R/utils-bib.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ make_bibkey <- function(tobibentry) {
165165

166166
init_aut <- tobibentry$author
167167

168-
# Try to get the editor if the author is null.
168+
# Try to get the editor if the author is `NULL`.
169169
if (is.null(init_aut)) {
170170
init_aut <- tobibentry$editor
171171
}

R/utils-cff_read.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ get_desc_urls <- function(pkg) {
195195
url <- pkg$get_urls()
196196
allurls <- desc_all_urls(pkg, url)
197197

198-
# If there are no URLs, return as null.
198+
# If there are no URLs, return as `NULL`.
199199
if (length(allurls) == 0) {
200200
return(list(url = NULL))
201201
}

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clean_str <- function(str) {
3131
clean
3232
}
3333

34-
#' Drop nulls from a list
34+
#' Drop `NULL` values from a list
3535
#' @param x A list to be cleaned.
3636
#' @source https://github.com/cboettig/codemeta/blob/master/R/utils.R
3737
#' @noRd

README.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ test <- cff_create("knitr")
177177
url: https://yihui.org/knitr/
178178
repository: https://CRAN.R-project.org/package=knitr
179179
repository-code: https://github.com/yihui/knitr
180-
commit: '1.51'
181180
url: https://yihui.org/knitr/
182181
date-released: '2025-12-20'
183182
contact:
@@ -345,6 +344,23 @@ test <- cff_create("knitr")
345344
orcid: https://orcid.org/0000-0002-7111-0077
346345
year: '2026'
347346
doi: 10.32614/CRAN.package.bslib
347+
- type: software
348+
title: DBI
349+
abstract: 'DBI: R Database Interface'
350+
notes: Suggests
351+
url: https://dbi.r-dbi.org
352+
repository: https://CRAN.R-project.org/package=DBI
353+
authors:
354+
- name: R Special Interest Group on Databases (R-SIG-DB)
355+
- family-names: Wickham
356+
given-names: Hadley
357+
- family-names: Müller
358+
given-names: Kirill
359+
email: kirill@cynkra.com
360+
orcid: https://orcid.org/0000-0002-1416-3412
361+
year: '2026'
362+
doi: 10.32614/CRAN.package.DBI
363+
version: '>= 0.4-1'
348364
- type: software
349365
title: digest
350366
abstract: 'digest: Create Compact Hash Digests of R Objects'
@@ -358,6 +374,21 @@ test <- cff_create("knitr")
358374
orcid: https://orcid.org/0000-0001-6419-907X
359375
year: '2026'
360376
doi: 10.32614/CRAN.package.digest
377+
- type: software
378+
title: gifski
379+
abstract: 'gifski: Highest Quality GIF Encoder'
380+
notes: Suggests
381+
url: https://r-rust.r-universe.dev/gifski
382+
repository: https://CRAN.R-project.org/package=gifski
383+
authors:
384+
- family-names: Ooms
385+
given-names: Jeroen
386+
email: jeroenooms@gmail.com
387+
orcid: https://orcid.org/0000-0002-4035-0289
388+
- name: Kornel Lesiński
389+
- name: Authors of the dependency Rust crates
390+
year: '2026'
391+
doi: 10.32614/CRAN.package.gifski
361392
- type: software
362393
title: htmlwidgets
363394
abstract: 'htmlwidgets: HTML Widgets for R'
@@ -383,6 +414,19 @@ test <- cff_create("knitr")
383414
year: '2026'
384415
doi: 10.32614/CRAN.package.htmlwidgets
385416
version: '>= 0.7'
417+
- type: software
418+
title: jpeg
419+
abstract: 'jpeg: Read and write JPEG images'
420+
notes: Suggests
421+
url: https://www.rforge.net/jpeg/
422+
repository: https://CRAN.R-project.org/package=jpeg
423+
authors:
424+
- family-names: Urbanek
425+
given-names: Simon
426+
email: Simon.Urbanek@r-project.org
427+
orcid: https://orcid.org/0000-0003-2297-1732
428+
year: '2026'
429+
doi: 10.32614/CRAN.package.jpeg
386430
- type: software
387431
title: magick
388432
abstract: 'magick: Advanced Graphics and Image-Processing in R'
@@ -396,6 +440,37 @@ test <- cff_create("knitr")
396440
orcid: https://orcid.org/0000-0002-4035-0289
397441
year: '2026'
398442
doi: 10.32614/CRAN.package.magick
443+
- type: software
444+
title: litedown
445+
abstract: 'litedown: A Lightweight Version of R Markdown'
446+
notes: Suggests
447+
url: https://github.com/yihui/litedown
448+
repository: https://CRAN.R-project.org/package=litedown
449+
authors:
450+
- family-names: Xie
451+
given-names: Yihui
452+
email: xie@yihui.name
453+
orcid: https://orcid.org/0000-0003-0645-5666
454+
year: '2026'
455+
doi: 10.32614/CRAN.package.litedown
456+
- type: software
457+
title: markdown
458+
abstract: 'markdown: Render Markdown with ''commonmark'''
459+
notes: Suggests
460+
url: https://github.com/rstudio/markdown
461+
repository: https://CRAN.R-project.org/package=markdown
462+
authors:
463+
- family-names: Xie
464+
given-names: Yihui
465+
email: xie@yihui.name
466+
orcid: https://orcid.org/0000-0003-0645-5666
467+
- family-names: Allaire
468+
given-names: JJ
469+
- family-names: Horner
470+
given-names: Jeffrey
471+
year: '2026'
472+
doi: 10.32614/CRAN.package.markdown
473+
version: '>= 1.3'
399474
- type: software
400475
title: otel
401476
abstract: 'otel: OpenTelemetry R API'
@@ -408,6 +483,19 @@ test <- cff_create("knitr")
408483
email: csardi.gabor@gmail.com
409484
year: '2026'
410485
doi: 10.32614/CRAN.package.otel
486+
- type: software
487+
title: png
488+
abstract: 'png: Read and write PNG images'
489+
notes: Suggests
490+
url: https://www.rforge.net/png/
491+
repository: https://CRAN.R-project.org/package=png
492+
authors:
493+
- family-names: Urbanek
494+
given-names: Simon
495+
email: Simon.Urbanek@r-project.org
496+
orcid: https://orcid.org/0000-0003-2297-1732
497+
year: '2026'
498+
doi: 10.32614/CRAN.package.png
411499
- type: software
412500
title: ragg
413501
abstract: 'ragg: Graphic Devices Based on AGG'
@@ -509,6 +597,18 @@ test <- cff_create("knitr")
509597
orcid: https://orcid.org/0000-0002-4958-2844
510598
year: '2026'
511599
doi: 10.32614/CRAN.package.sass
600+
- type: software
601+
title: showtext
602+
abstract: 'showtext: Using Fonts More Easily in R Graphs'
603+
notes: Suggests
604+
url: https://github.com/yixuan/showtext
605+
repository: https://CRAN.R-project.org/package=showtext
606+
authors:
607+
- family-names: Qiu
608+
given-names: Yixuan
609+
email: yixuan.qiu@cos.name
610+
year: '2026'
611+
doi: 10.32614/CRAN.package.showtext
512612
- type: software
513613
title: styler
514614
abstract: 'styler: Non-Invasive Pretty Printing of R Code'

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
},
235235
"isPartOf": "https://ropensci.org",
236236
"keywords": ["attribution", "citation", "credit", "citation-files", "cff", "metadata", "citation-file-format", "cran", "r", "r-package", "ropensci", "rstats", "r-cran"],
237-
"fileSize": "996.118KB",
237+
"fileSize": "986.856KB",
238238
"citation": [
239239
{
240240
"@type": "ScholarlyArticle",

0 commit comments

Comments
 (0)