Title: | 'Dat' Protocol Interface |
Version: | 0.1.0 |
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. |
License: | GPL-3 |
Depends: | R (≥ 3.1) |
Imports: | devtools, |
Suggests: | covr, testthat |
SystemRequirements: | dat (>= 13.10.0) |
ByteCompile: | true |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.0.1 |
URL: | https://github.com/libscie/datr |
BugReports: | https://github.com/libscie/datr/issues |
NeedsCompilation: | no |
Packaged: | 2018-03-23 18:57:51 UTC; chjh |
Author: | Chris Hartgerink [aut, cre] |
Maintainer: | Chris Hartgerink <chris@libscie.org> |
Repository: | CRAN |
Date/Publication: | 2018-03-26 09:22:29 UTC |
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.
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
## Not run:
clone_dat(link = 'dat://datr-chris.hashbase.io', dir = tempdir())
## End(Not run)
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.
Examples
## Not run:
dat_install(os = 'win')
dat_install(os = 'macos')
dat_install(os = 'linux')
## End(Not run)
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
## Not run:
log_dat(path = '.')
log_dat(path = 'dat://pastedat-taravancil.hashbase.io')
## End(Not run)
Update Dat folder
Description
Function to update working directory if it is a Dat folder. This function only receives updates.
Usage
pull_dat()
Examples
## Not run:
pull_dat()
## End(Not run)
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
## Not run:
sync_dat()
## End(Not run)