repo_bulkedit: Edit all items info using a text file.

Description Usage Arguments Details Value See Also Examples

View source: R/repo_public.R

Description

Edit all items info using a text file.

Usage

1
repo_bulkedit(outfile = NULL, infile = NULL)

Arguments

outfile

Name of a file to put entries data to.

infile

Name of a file to read entries data from.

Details

Exactly one of outfile or infile must be supplied. All repository entry fields are copied to a tab-separated file when using the outfile parameter. All repo entries are updated reading from infile when the infile parameter is used. Within the TAGS field, tags must be comma-separated. The system writes a checksum to the outfile that prevents from using it as infile if repo has changed in the meantime.

Value

Used for side effects.

See Also

repo_set

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rp_path <- file.path(tempdir(), "example_repo")
rp <- repo_open(rp_path, TRUE)
rp$put(1, "item1", "Sample item 1", c("tag1", "tag2"))

items_data_file <- tempfile()
rp$bulkedit(items_data_file)
## Manually edit items_data_file, then update items:
rp$bulkedit(infile=items_data_file)

## wiping temporary repo
unlink(rp_path, TRUE)

franapoli/repo documentation built on May 17, 2021, 7:24 p.m.