Skip to contents

Pure plan builder: applies transform to every title and returns patch rows only where the result differs. Feed the result to zotPreview().

Usage

ztRetitle(items, transform)

Arguments

items

A data.table with itemKey, library, title.

transform

A function from one title to its cleaned form.

Value

A guarded-flow plan (possibly empty).

Examples

Items <- data.table::data.table(
  itemKey = c("A", "B"), library = "user",
  title = c("Reviewed book (1).pdf", "Existing title")
)
ztRetitle(Items, transform = ztCleanTitle)
#>    action library itemKey   payload
#>    <char>  <char>  <char>    <list>
#> 1:  patch    user       A <list[1]>