This is a wrapper around the synthesisr function read_refs that processes the hits in a set of subdirectories in a directory, specifying the original file, directory, and, if the files were names using a convention, date, database, and interface (see the search_metadataRegex argument).

import_search_results(
  path,
  dirRegex = ".*",
  fileRegex = "\\.ris$",
  dirsToIgnoreRegex = NULL,
  filesToIgnoreRegex = NULL,
  recursive = TRUE,
  perl = TRUE,
  idFieldName = "original_id",
  parallel = FALSE,
  search_metadataRegex = metabefor::opts$get("search_metadataRegex"),
  silent = metabefor::opts$get("silent")
)

Arguments

path

The path to the files with the search results.

dirRegex

The regular expression to match subdirectories against.

fileRegex

The regular expression to match filenames against.

dirsToIgnoreRegex, filesToIgnoreRegex

A regular expression to specify which directories and files should be ignored.

recursive

Whether to recursively read subdirectories.

perl

Whether to use Perl regular expressions

idFieldName

New name to use for the id field (column), a reserved name in JabRef (if NULL, the field is not renamed).

parallel

Whether to use multiple cores for parallel processing.

search_metadataRegex

A regular expression to match against the filenames. If it matches, metadata will be extracted in three capturing groups, in the order date (using ISO standard 8601 format, i.e. 2022-03-05), interface, and database.

silent

Whether to be silent or chatty.

Value

An object with all the imported information, including, most importantly, the data frame bibHitDf with all results.