-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modernize load hook, add backwards compatibility tests
- Loading branch information
1 parent
c514163
commit 3431725
Showing
12 changed files
with
327 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
# .onLoad hook for when namespace is loaded | ||
.onLoad <- function(libname, pkgname) { | ||
configure_exiftool(quiet = TRUE, install_url = TRUE) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
#' Read EXIF data | ||
#' | ||
#' This function has been deprecated, use \link{read_exif} instead. | ||
#' | ||
#' @param filename A vector of filenames (like that generated by | ||
#' \code{list.files(..., full.names=TRUE)}) | ||
#' @param recursive If directory is specified by \code{filename}, process files recursively. | ||
#' @param quiet \code{FALSE} if status updates are desired, \code{TRUE} | ||
#' otherwise. | ||
#' @param exiftoolargs a list of args to be passed to ExifTool (e.g. \code{c("-filename", "-imagesize")}) | ||
#' | ||
#' @export | ||
#' | ||
exifr <- function(filename, recursive=FALSE, quiet=TRUE, exiftoolargs=NULL) { | ||
message("exifr() is deprecated, and has been replaced by read_exif()") | ||
read_exif(path = filename, recursive = recursive, args = exiftoolargs, quiet = quiet) | ||
} | ||
|
||
#' Call exiftool from R | ||
#' | ||
#' This function has been deprecated. Use \link{exiftool_call} instead. | ||
#' | ||
#' @param args a list of non-shell quoted arguments (e.g. \code{-n -csv}) | ||
#' @param fnames a list of filenames (\code{shQuote()} will be applied to this vector) | ||
#' @param intern \code{TRUE} if output should be returned as a character vector. | ||
#' @param ... additional arguments to be passed to \code{system()} | ||
#' | ||
#' @export | ||
#' | ||
exiftool.call <- function(args=c("--help"), fnames=NULL, intern=FALSE, ...) { | ||
message("exiftool.call has been deprecated and has been replaced by exiftool_call()") | ||
exiftool_call(args = args, fnames = fnames, intern = intern, ...) | ||
} | ||
|
||
|
||
# private helper command | ||
exiftool.command <- function(args, fnames) { | ||
exiftoolpath <- options("exifr.exiftoolcommand")$exifr.exiftoolcommand | ||
if(is.null(exiftoolpath)) stop("ExifTool not properly installed") | ||
if(length(fnames) > 0) { | ||
paste(exiftoolpath, paste(args, collapse=" "), paste(shQuote(fnames), collapse=" ")) | ||
} else { | ||
paste(exiftoolpath, paste(args, collapse=" ")) | ||
} | ||
} |
Oops, something went wrong.