Package 'datr'

Title: 'Dat' Protocol Interface
Description: Interface with the 'Dat' p2p network protocol <https://datproject.org>. Clone archives from the network, share your own files, and install packages from the network.
Authors: Chris Hartgerink [aut, cre]
Maintainer: Chris Hartgerink <[email protected]>
License: GPL-3
Version: 0.1.0.900
Built: 2024-10-24 04:58:52 UTC
Source: https://github.com/libscie/datr

Help Index


Clone a Dat link to directory

Description

Function to clone a Dat link to the machine.

Usage

clone_dat(link, dir)

Arguments

link

Dat link (always clones latest version now)

dir

Directory to clone to. If non-existent, will create.

Examples

clone_dat(link = 'dat://datr-chris.hashbase.io', dir = tempdir())

Checking the command to be passed to Dat system call

Description

Checking the command to be passed to Dat system call

Usage

cmd_check(x)

Arguments

x

Command to check


Create Dat metadata

Description

Function to create a dat.json interactively, with title and description.

Usage

create_dat(dir = ".")

Arguments

dir

Directory to create Dat. Defaults to working directory.

Examples

create_dat(dir = tempdir())

Dat install

Description

Download the released binaries for Dat and add them to your environment. If a more recent version has been released, you can specify it as argument (we try to update it accordingly, but might sometimes have time off!).

Usage

dat_install(os = "win", path, ver = "13.10.0")

Arguments

os

'win' (Windows), 'mac', or 'linux'

path

Where to install Dat

ver

Version. See https://github.com/datproject/dat/releases

Value

NULL. Prints stdout of terminal along the way.

Note

The system 'PATH' will be modified. On Linux-ish systems, ~/.profile will also be modified.

Examples

## Not run: 
  dat_install(os = 'win')
  dat_install(os = 'macos')
  dat_install(os = 'linux')

## End(Not run)

Which version of Dat is installed?

Description

Which version of Dat is installed?

Usage

dat_version()

Value

Dat version string (if installed)

Examples

dat_version()

datr: Dat Protocol Interface

Description

Interface with the 'Dat' p2p network protocol <https://datproject.org>. Clone archives from the network, share your own files, and install packages from the network.


Install R package from Dat link

Description

Directly install an R package from a Dat link.

Usage

install_dat(link, dir)

Arguments

link

Dat link

dir

Temporary directory to store download in.

Value

Console log.

Examples

## Not run: 
  install_dat('dat://datr-chris.hashbase.io', dir = tempdir())

## End(Not run)

Show Dat archive log

Description

Retrieve log of the Dat folder. You can either retrieve the log of a Dat link (argument link) or of a local Dat folder (argument dir). Defaults to giving the log of the working directory. If a Dat link is provided, this overrides the dir argument.

Usage

log_dat(path)

Arguments

path

Dat archive, can both be local or on the network.

Value

Console log.

Examples

log_dat(path = '.')
log_dat(path = 'dat://pastedat-taravancil.hashbase.io')

Update Dat folder

Description

Function to update working directory if it is a Dat folder. This function only receives updates.

Usage

pull_dat()

Examples

pull_dat()

Share folder to network

Description

Share directory to the Dat network, until aborted. Requires write access to Dat archive.

Usage

share_dat(dir = ".")

Arguments

dir

Directory to share. Defaults to working directory.

Examples

share_dat(dir = tempdir())

Status of the Dat folder

Description

Get some information Dat folder in the working directory. Includes: Dat link, the number of files, and the current version.

Usage

status_dat()

Value

Console log.

Examples

## Not run: 
  status_dat()

## End(Not run)

Synchronize with Dat network

Description

Synchronize directory with the Dat network. If write access to the Dat is available, this is equivalent to share_dat. If read-only access is available, this is equivalent to pull_dat.

Usage

sync_dat()

Examples

sync_dat()