alink: Return a Link To Download an Artifact Stored on Remote...

Description Usage Arguments Details Value Contact Author(s) See Also Examples

View source: R/alink.R

Description

alink returns a link to download an artifact from the Remote Repository. Artifact has to be already archived on GitHub, e.g with archivist.github::archive function (recommended) or saveToRepo function and traditional Git manual synchronization. To learn more about artifacts visit archivist-package.

Usage

1
2
3
4
alink(md5hash, repo = aoptions("repo"), user = aoptions("user"),
  subdir = aoptions("subdir"), branch = "master",
  repoType = aoptions("repoType"), format = "markdown",
  rawLink = FALSE)

Arguments

md5hash

A character assigned to the artifact through the use of a cryptographical hash function with MD5 algorithm. If it is specified in a format of 'repo/user/md5hash' then user and repo parameters are omitted.

repo

The Remote Repository on which the artifact that we want to download is stored.

user

The name of a user on whose Repository the the artifact that we want to download is stored.

subdir

A character containing a name of a directory on the Remote repository on which the Repository is stored. If the Repository is stored in the main folder on the Remote repository, this should be set to subdir = "/" as default.

branch

A character containing a name of the Remote Repository's branch on which the Repository is archived. Default branch is master.

repoType

A character containing a type of the remote repository. Currently it can be 'github' or 'bitbucket'.

format

In which format the link should be returned. Possibilites are markdown (default) or latex.

rawLink

A logical denoting whether to return raw link or a link in the format convention. Default value is FALSE.

Details

For more information about md5hash see md5hash.

Value

This function returns a link to download artifact that is archived on GitHub.

Contact

Bug reports and feature requests can be sent to https://github.com/pbiecek/archivist/issues

Author(s)

Marcin Kosinski, m.p.kosinski@gmail.com

See Also

Other archivist: Repository, Tags, %a%, addHooksToPrint, addTagsRepo, aformat, ahistory, aoptions, archivist-package, areadLocal, aread, asearchLocal, asearch, asession, atrace, cache, copyLocalRepo, createLocalRepo, createMDGallery, deleteLocalRepo, getRemoteHook, getTagsLocal, loadFromLocalRepo, md5hash, removeTagsRepo, restoreLibs, rmFromLocalRepo, saveToLocalRepo, searchInLocalRepo, setLocalRepo, shinySearchInLocalRepo, showLocalRepo, splitTagsLocal, summaryLocalRepo, zipLocalRepo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# link in markdown format
alink('pbiecek/archivist/134ecbbe2a8814d98f0c2758000c408e')
# link in markdown format with additional subdir
alink(user='BetaAndBit',repo='PieczaraPietraszki',
     md5hash = '1569cc44e8450439ac52c11ccac35138', 
     subdir = 'UniwersytetDzieci/arepo')
# link in latex format
alink(user = 'MarcinKosinski', repo = 'Museum',
      md5hash = '1651caa499a2b07a3bdad3896a2fc717', format = 'latex')
# link in raw format
alink('pbiecek/graphGallery/f5185c458bff721f0faa8e1332f01e0f', rawLink = TRUE)  
alink('pbiecek/graphgallerygit/02af4f99e440324b9e329faa293a9394', repoType='bitbucket')  

## End(Not run)

archivist documentation built on Aug. 31, 2019, 5:05 p.m.