install_gnparser: Install gnparser

View source: R/install_gnparser.R

install_gnparserR Documentation

Install gnparser

Description

Downloads the appropriate gnparser executable for your platform and tries to copy it to a system directory so rgnparser can run the gnparser command.

Usage

install_gnparser(version = "latest", force = FALSE)

Arguments

version

The gnparser version number, e.g., 1.0.0; the default latest means the latest version (fetched from GitHub releases). Alternatively, this argument can take a file path of the zip archive or tarball of gnparser that has already been downloaded from GitHub, in which case it will not be downloaded again. The minimum version is v1.0.0 because gnparser v1 introduced breaking changes - and we don't support older versions of gnparser here.

force

Whether to install gnparser even if it has already been installed. This may be useful when upgrading gnparser.

Details

This function tries to install gnparser to Sys.getenv('APPDATA') on Windows, ~/Library/Application Support on macOS, and ~/bin/ on other platforms (such as Linux). If these directories are not writable, the package directory gnparser of rgnparser will be used. If it still fails, you have to install gnparser by yourself and make sure it can be found via the environment variable PATH.

This is just a helper function and may fail to choose the correct gnparser executable for your operating system, especially if you are not on Windows or Mac or a major Linux distribution. When in doubt, read the gnparser documentation and install it yourself: https://github.com/gnames/gnparser#installation

Note

modified from blogdown::install_hugo


rgnparser documentation built on Feb. 16, 2023, 5:28 p.m.