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

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

Arguments

version

The gnparser version number, e.g., 0.14.1; the default latest means the latest version (fetched from GitLab releases). Alternatively, this argument can take a file path of the zip archive or tarball of gnparser that has already been downloaded from GitLab, in which case it will not be downloaded again.

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://gitlab.com/gogna/gnparser#installation

Note

modified from blogdown::install_hugo