Learn R Programming

acdcquery (version 1.2.2)

download_sqlite_release: Download SQLite file from GitHub release

Description

Downloads a SQLite database file from the latest or a specific GitHub release.

Usage

download_sqlite_release(
  owner,
  repo,
  asset_name,
  dest_dir,
  tag = NULL,
  algo = "sha256",
  token = Sys.getenv("GITHUB_PAT"),
  overwrite = TRUE
)

Value

Invisibly returns the full path to the downloaded file.

Arguments

owner

Repository owner.

repo

Repository name.

asset_name

Name of the SQLite asset in the release.

dest_dir

Local directory where the file should be saved.

tag

Optional release tag (e.g., "v1.2.0"). If NULL, the latest release is used.

algo

Hash algorithm (default: "sha256").

token

Optional GitHub token. Defaults to Sys.getenv("GITHUB_PAT").

overwrite

Whether to overwrite existing file (default: TRUE).

Examples

Run this code
if (FALSE) {
download_sqlite_release(
  owner = "myuser",
  repo = "myrepo",
  asset_name = "database.sqlite",
  dest_dir = tempdir()
)
}

Run the code above in your browser using DataLab