From 01f7fb496be66cf63ebb5776b084dfc1f730682b Mon Sep 17 00:00:00 2001 From: eblondel Date: Mon, 11 Apr 2022 22:03:32 +0200 Subject: [PATCH] #74 pkgdown website --- .Rbuildignore | 3 + NEWS.md | 3 +- README.md | 6 +- _pkgdown.yml | 0 docs/404.html | 104 ++ docs/CODE_OF_CONDUCT.html | 103 ++ docs/LICENSE-text.html | 80 ++ docs/authors.html | 115 ++ docs/bootstrap-toc.css | 60 + docs/bootstrap-toc.js | 159 +++ docs/docsearch.css | 148 ++ docs/docsearch.js | 85 ++ docs/index.html | 179 +++ docs/link.svg | 12 + docs/news/index.html | 76 + docs/pkgdown.css | 384 +++++ docs/pkgdown.js | 108 ++ docs/pkgdown.yml | 6 + docs/reference/Rplot001.png | Bin 0 -> 1011 bytes docs/reference/ZenodoManager.html | 979 +++++++++++++ docs/reference/ZenodoRecord.html | 2038 +++++++++++++++++++++++++++ docs/reference/ZenodoRequest.html | 269 ++++ docs/reference/download_zenodo.html | 129 ++ docs/reference/export_zenodo.html | 114 ++ docs/reference/get_versions.html | 105 ++ docs/reference/human_filesize.html | 106 ++ docs/reference/index.html | 114 ++ docs/reference/zen4R.html | 89 ++ docs/reference/zen4RLogger.html | 252 ++++ docs/reference/zenodo_pat.html | 89 ++ docs/sitemap.xml | 54 + 31 files changed, 5965 insertions(+), 4 deletions(-) create mode 100644 _pkgdown.yml create mode 100644 docs/404.html create mode 100644 docs/CODE_OF_CONDUCT.html create mode 100644 docs/LICENSE-text.html create mode 100644 docs/authors.html create mode 100644 docs/bootstrap-toc.css create mode 100644 docs/bootstrap-toc.js create mode 100644 docs/docsearch.css create mode 100644 docs/docsearch.js create mode 100644 docs/index.html create mode 100644 docs/link.svg create mode 100644 docs/news/index.html create mode 100644 docs/pkgdown.css create mode 100644 docs/pkgdown.js create mode 100644 docs/pkgdown.yml create mode 100644 docs/reference/Rplot001.png create mode 100644 docs/reference/ZenodoManager.html create mode 100644 docs/reference/ZenodoRecord.html create mode 100644 docs/reference/ZenodoRequest.html create mode 100644 docs/reference/download_zenodo.html create mode 100644 docs/reference/export_zenodo.html create mode 100644 docs/reference/get_versions.html create mode 100644 docs/reference/human_filesize.html create mode 100644 docs/reference/index.html create mode 100644 docs/reference/zen4R.html create mode 100644 docs/reference/zen4RLogger.html create mode 100644 docs/reference/zenodo_pat.html create mode 100644 docs/sitemap.xml diff --git a/.Rbuildignore b/.Rbuildignore index 12ff50c..14f3dc8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,3 +2,6 @@ ^\.Rproj\.user$ .github ^CODE_OF_CONDUCT\.md$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/NEWS.md b/NEWS.md index e985a68..44f05aa 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,8 @@ * [#66](https://github.com/eblondel/zen4R/issues/66) Add record custom print method supporting various formats (internal + Zenodo supported export formats) * [#71](https://github.com/eblondel/zen4R/issues/71) Add `export_zenodo` function -ù [#73](https://github.com/eblondel/zen4R/issues/73) Add mapping from published ZenodoRecord to [atom4R](https://github.com/eblondel/atom4R) DCEntry +* [#73](https://github.com/eblondel/zen4R/issues/73) Add mapping from published ZenodoRecord to [atom4R](https://github.com/eblondel/atom4R) DCEntry +* [#74](https://github.com/eblondel/zen4R/issues/74) Package github-pages with pkgdown **Enhancements** diff --git a/README.md b/README.md index 9a89aef..8c46608 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ -# zen4R - [![Build Status](https://github.com/eblondel/zen4R/actions/workflows/r-cmd-check.yml/badge.svg?branch=master)](https://github.com/eblondel/zen4R/actions/workflows/r-cmd-check.yml) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/zen4R)](https://cran.r-project.org/package=zen4R) [![Github_Status_Badge](https://img.shields.io/badge/Github-0.6-blue.svg)](https://github.com/eblondel/zen4R) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2547036.svg)](https://doi.org/10.5281/zenodo.2547036) -**R Interface to Zenodo REST API** +**zen4R – R Interface to Zenodo REST API** The R package ``zen4R`` provides an interface to the [Zenodo e-infrastructure](https://zenodo.org) API. @@ -20,6 +18,8 @@ Many thanks to the following organizations that have provided fundings for stren +












+ The following projects have contributed to strenghten ``zen4R``: diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..e69de29 diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..c4db72b --- /dev/null +++ b/docs/404.html @@ -0,0 +1,104 @@ + + + + + + + +Page not found (404) • zen4R + + + + + + + + + + + +
+
+ + + + +
+
+ + +Content not found. Please use links in the navbar. + +
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown +2.0.2.

+
+ +
+
+ + + + + + + + diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html new file mode 100644 index 0000000..4421941 --- /dev/null +++ b/docs/CODE_OF_CONDUCT.html @@ -0,0 +1,103 @@ + +Contributor Code of Conduct • zen4R + + +
+
+ + + +
+
+ + +
+ +

As contributors and maintainers of this project, we pledge to respect +all people who contribute through reporting issues, posting feature +requests, updating documentation, submitting pull requests or patches, +and other activities.

+

We are committed to making participation in this project a +harassment-free experience for everyone, regardless of level of +experience, gender, gender identity and expression, sexual orientation, +disability, personal appearance, body size, race, ethnicity, age, or +religion.

+

Examples of unacceptable behavior by participants include the use of +sexual language or imagery, derogatory comments or personal attacks, +trolling, public or private harassment, insults, or other unprofessional +conduct.

+

Project maintainers have the right and responsibility to remove, +edit, or reject comments, commits, code, wiki edits, issues, and other +contributions that are not aligned to this Code of Conduct. Project +maintainers who do not follow the Code of Conduct may be removed from +the project team.

+

Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue or contacting one or more of the +project maintainers.

+

This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, +available at http://contributor-covenant.org/version/1/0/0/

+
+ +
+ + + +
+ + + +
+ +
+

Site built with pkgdown +2.0.2.

+
+ +
+ + + + + + + + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html new file mode 100644 index 0000000..a6751b1 --- /dev/null +++ b/docs/LICENSE-text.html @@ -0,0 +1,80 @@ + +License • zen4R + + +
+
+ + + +
+
+ + +
YEAR: 2019
+COPYRIGHT HOLDER: Emmanuel Blondel
+
+ +
+ + + +
+ + + +
+ +
+

Site built with pkgdown +2.0.2.

+
+ +
+ + + + + + + + diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..a3250cb --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,115 @@ + +Authors and Citation • zen4R + + +
+
+ + + +
+
+
+ + + +
  • +

    Emmanuel Blondel. Author, maintainer. +

    +
  • +
  • +

    Julien Barde. Contributor. +

    +
  • +
  • +

    Stephen Eglen. Contributor. +

    +
  • +
  • +

    Hans Van Calster. Contributor. +

    +
  • +
  • +

    Floris Vanderhaeghe. Contributor. +

    +
  • +
+
+
+

Citation

+ Source: DESCRIPTION +
+
+ + +

Blondel E (2022). +zen4R: Interface to 'Zenodo' REST API. +R package version 0.6, https://github.com/eblondel/zen4R. +

+
@Manual{,
+  title = {zen4R: Interface to 'Zenodo' REST API},
+  author = {Emmanuel Blondel},
+  year = {2022},
+  note = {R package version 0.6},
+  url = {https://github.com/eblondel/zen4R},
+}
+ +
+ +
+ + + +
+ +
+

Site built with pkgdown +2.0.2.

+
+ +
+ + + + + + + + diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 0000000..5a85941 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 0000000..1cdd573 --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..e5f1fe1 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,148 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/docs/docsearch.js b/docs/docsearch.js new file mode 100644 index 0000000..b35504c --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..8da2e0b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,179 @@ + + + + + + + +Interface to Zenodo REST API • zen4R + + + + + + + + + + + + +
    +
    + + + + +
    +
    + + +

    zen4R – R Interface to Zenodo REST API

    +

    The R package zen4R provides an interface to the Zenodo e-infrastructure API.

    +

    Please check the online documentation +for more details!

    +
    +

    Sponsors +

    +

    Many thanks to the following organizations that have provided +fundings for strenghtening the geoflow package:

    +
    +

    +
    +














    +

    The following projects have contributed to strenghten +zen4R:

    +

    +

    Blue-Cloud has received funding from the European Union’s Horizon +programme call BG-07-2019-2020, topic: [A] 2019 - Blue Cloud services, +Grant Agreement No.862409.

    +

    For zen4R sponsoring/funding new developments, enhancements, support +requests, please contact me by e-mail

    +
    +
    +

    Citation +

    +

    We thank in advance people that use zen4R for citing it +in their work / publication(s). For this, please use the citation +provided at this link DOI

    +
    + +
    + + +
    + + +
    + +
    +

    +

    Site built with pkgdown +2.0.2.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/link.svg b/docs/link.svg new file mode 100644 index 0000000..88ad827 --- /dev/null +++ b/docs/link.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 0000000..1499d78 --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,76 @@ + +Changelog • zen4R + + +
    +
    + + + +
    +
    + + +
    + + + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..80ea5b8 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,384 @@ +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + +body { + position: relative; +} + +body > .container { + display: flex; + height: 100%; + flex-direction: column; +} + +body > .container .row { + flex: 1 0 auto; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; + flex-shrink: 0; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +/* Ensure in-page images don't run outside their container */ +.contents img { + max-width: 100%; + height: auto; +} + +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents .page-header { + margin-top: calc(-60px + 1em); +} + +dd { + margin-left: 3em; +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + display: none; + margin-left: 5px; + width: 20px; + height: 20px; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; +} + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -40px; +} + +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + +/* Sidebar --------------------------*/ + +#pkgdown-sidebar { + margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; +} + +#pkgdown-sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#pkgdown-sidebar h2:first-child { + margin-top: 0; +} + +#pkgdown-sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + +.orcid { + font-size: 16px; + color: #A6CE39; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} + +.ref-index td {vertical-align: top; min-width: 100px} +.ref-index .icon {width: 40px;} +.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre, code, pre code { + background-color: #f8f8f8; + color: #333; +} +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} + +pre { + border: 1px solid #eee; +} + +pre .img, pre .r-plt { + margin: 5px 0; +} + +pre .img img, pre .r-plt img { + background-color: #fff; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.error {font-weight: bolder;} +.warning {font-weight: bolder;} + +/* Clipboard --------------------------*/ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} + +/* vertical spacing after htmlwidgets */ +.html-widget { + margin-bottom: 10px; +} + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 0000000..6f0eee4 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,108 @@ +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); + + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } + } + + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); + + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } + + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); + + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } + + return(haystack.length); + } + + /* Clipboard --------------------------*/ + + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); + } + + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $("div.sourceCode").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + } + }); + + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); + + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); + }); + } +})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml new file mode 100644 index 0000000..cf48e60 --- /dev/null +++ b/docs/pkgdown.yml @@ -0,0 +1,6 @@ +pandoc: 2.17.1.1 +pkgdown: 2.0.2 +pkgdown_sha: ~ +articles: {} +last_built: 2022-04-11T20:02Z + diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000000000000000000000000000000000000..17a358060aed2a86950757bbd25c6f92c08c458f GIT binary patch literal 1011 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0x7m6Z+90U4Fo@(ch>_c&H|6f zVg?3oArNM~bhqvg0|WD9PZ!6KiaBo&GBN^{G%5UFpXcEKVvd5*5Eu=C0SJK)8A6*F U7`aXvEC5;V>FVdQ&MBb@00SN#Z2$lO literal 0 HcmV?d00001 diff --git a/docs/reference/ZenodoManager.html b/docs/reference/ZenodoManager.html new file mode 100644 index 0000000..05c1acf --- /dev/null +++ b/docs/reference/ZenodoManager.html @@ -0,0 +1,979 @@ + +ZenodoManager — ZenodoManager • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    ZenodoManager

    +

    ZenodoManager

    +
    + + +
    +

    Format

    +

    R6Class object.

    +
    +
    +

    Value

    +

    Object of R6Class for modelling an ZenodoManager

    +
    +
    +

    Note

    +

    Main user class to be used with zen4R

    +
    +
    +

    Author

    +

    Emmanuel Blondel <emmanuel.blondel1@gmail.com>

    +
    +
    +

    Super class

    +

    zen4R::zen4RLogger -> ZenodoManager

    +
    +
    +

    Public fields

    +

    anonymous
    +

    Zenodo manager anonymous status, TRUE when no token is specified

    + + +

    +
    +
    +

    Methods

    + +

    Inherited methods


    +

    Method new()

    +

    initializes the Zenodo Manager

    +

    Usage

    +

    ZenodoManager$new(
    +  url = "https://zenodo.org/api",
    +  token = zenodo_pat(),
    +  logger = NULL,
    +  keyring_backend = "env"
    +)

    +
    + +
    +

    Arguments

    +

    url
    +

    Zenodo API URL. By default, the url is set to "https://zenodo.org/api". For tests, +the Zenodo sandbox API URL can be used: https://sandbox.zenodo.org/api

    + + +
    token
    +

    the user token. By default an attempt will be made to retrieve token using zenodo_pat

    + + +
    logger
    +

    logger type. The logger can be either NULL, "INFO" (with minimum logs), or "DEBUG" +(for complete curl http calls logs)

    + + +
    keyring_backend
    +

    The keyring backend used to store user token. The keyring_backend +can be set to use a different backend for storing the Zenodo token with keyring (Default value is 'env').

    + + +

    +
    + +


    +

    Method getToken()

    +

    Get user token

    +

    Usage

    +

    ZenodoManager$getToken()

    +
    + +
    +

    Returns

    +

    the token, object of class character

    +
    + +


    +

    Method getLicenses()

    +

    Get Licenses supported by Zenodo.

    +

    Usage

    +

    ZenodoManager$getLicenses(pretty = TRUE)

    +
    + +
    +

    Arguments

    +

    pretty
    +

    Prettify the output. By default the argument pretty is set to +TRUE which will returns the list of licenses as data.frame. +Set pretty = FALSE to get the raw list of licenses.

    + + +

    +
    +
    +

    Returns

    +

    list of licenses as data.frame or list

    +
    + +


    +

    Method getLicenseById()

    +

    Get license by Id.

    +

    Usage

    +

    ZenodoManager$getLicenseById(id)

    +
    + +
    +

    Arguments

    +

    id
    +

    license id

    + + +

    +
    +
    +

    Returns

    +

    the license

    +
    + +


    +

    Method getCommunities()

    +

    Get Communities supported by Zenodo.

    +

    Usage

    +

    ZenodoManager$getCommunities(pretty = TRUE)

    +
    + +
    +

    Arguments

    +

    pretty
    +

    Prettify the output. By default the argument pretty is set to +TRUE which will returns the list of communities as data.frame. +Set pretty = FALSE to get the raw list of communities

    + + +

    +
    +
    +

    Returns

    +

    list of communities as data.frame or list

    +
    + +


    +

    Method getCommunityById()

    +

    Get community by Id.

    +

    Usage

    +

    ZenodoManager$getCommunityById(id)

    +
    + +
    +

    Arguments

    +

    id
    +

    community id

    + + +

    +
    +
    +

    Returns

    +

    the community

    +
    + +


    +

    Method getGrants()

    +

    Get Grants supported by Zenodo.

    +

    Usage

    +

    ZenodoManager$getGrants(pretty = TRUE, size = 1000)

    +
    + +
    +

    Arguments

    +

    pretty
    +

    Prettify the output. By default the argument pretty is set to +TRUE which will returns the list of grants as data.frame. +Set pretty = FALSE to get the raw list of grants

    + + +
    size
    +

    number of grants to be returned. By default equal to 1000.

    + + +

    +
    +
    +

    Returns

    +

    list of grants as data.frame or list

    +
    + +


    +

    Method getGrantById()

    +

    Get grant by Id.

    +

    Usage

    +

    ZenodoManager$getGrantById(id)

    +
    + +
    +

    Arguments

    +

    id
    +

    grant id

    + + +

    +
    +
    +

    Returns

    +

    the grant

    +
    + +


    +

    Method getFunders()

    +

    Get Funders supported by Zenodo.

    +

    Usage

    +

    ZenodoManager$getFunders(pretty = TRUE, size = 1000)

    +
    + +
    +

    Arguments

    +

    pretty
    +

    Prettify the output. By default the argument pretty is set to +TRUE which will returns the list of funders as data.frame. +Set pretty = FALSE to get the raw list of grants

    + + +
    size
    +

    number of funders to be returned. By default equal to 1000.

    + + +

    +
    +
    +

    Returns

    +

    list of funders as data.frame or list

    +
    + +


    +

    Method getFunderById()

    +

    Get funder by Id.

    +

    Usage

    +

    ZenodoManager$getFunderById(id)

    +
    + +
    +

    Arguments

    +

    id
    +

    funder id

    + + +

    +
    +
    +

    Returns

    +

    the funder

    +
    + +


    +

    Method getDepositions()

    +

    Get the list of Zenodo records deposited in your Zenodo workspace. By defaut + the list of depositions will be returned by page with a size of 10 results per + page (default size of the Zenodo API). The parameter q allows to specify + an ElasticSearch-compliant query to filter depositions (default query is empty + to retrieve all records). The argument all_versions, if set to TRUE allows + to get all versions of records as part of the depositions list. The argument exact + specifies that an exact matching is wished, in which case paginated search will be + disabled (only the first search page will be returned). + Examples of ElasticSearch queries for Zenodo can be found at https://help.zenodo.org/guides/search/.

    +

    Usage

    +

    ZenodoManager$getDepositions(
    +  q = "",
    +  size = 10,
    +  all_versions = FALSE,
    +  exact = TRUE,
    +  quiet = FALSE
    +)

    +
    + +
    +

    Arguments

    +

    q
    +

    Elastic-Search-compliant query, as object of class character. Default is ""

    + + +
    size
    +

    number of depositions to be retrieved per request (paginated). Default is 10

    + + +
    all_versions
    +

    object of class logical indicating if all versions of deposits have to be retrieved. Default is FALSE

    + + +
    exact
    +

    object of class logical indicating if exact matching has to be applied. Default is TRUE

    + + +
    quiet
    +

    object of class logical indicating if logs have to skipped. Default is FALSE

    + + +

    +
    +
    +

    Returns

    +

    a list of ZenodoRecord

    +
    + +


    +

    Method getDepositionByConceptDOI()

    +

    Get a Zenodo deposition record by concept DOI (generic DOI common to all deposition record versions).

    +

    Usage

    +

    ZenodoManager$getDepositionByConceptDOI(conceptdoi)

    +
    + +
    +

    Arguments

    +

    conceptdoi
    +

    the concept DOI, object of class character

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord if record does exist, NULL otherwise

    +
    + +


    +

    Method getDepositionByDOI()

    +

    Get a Zenodo deposition record by DOI.

    +

    Usage

    +

    ZenodoManager$getDepositionByDOI(doi)

    +
    + +
    +

    Arguments

    +

    doi
    +

    the DOI, object of class character

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord if record does exist, NULL otherwise

    +
    + +


    +

    Method getDepositionById()

    +

    Get a Zenodo deposition record by ID.

    +

    Usage

    +

    ZenodoManager$getDepositionById(recid)

    +
    + +
    +

    Arguments

    +

    recid
    +

    the record ID, object of class character

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord if record does exist, NULL otherwise

    +
    + +


    +

    Method getDepositionByConceptId()

    +

    Get a Zenodo deposition record by concept ID.

    +

    Usage

    +

    ZenodoManager$getDepositionByConceptId(conceptrecid)

    +
    + +
    +

    Arguments

    +

    conceptrecid
    +

    the record concept ID, object of class character

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord if record does exist, NULL otherwise

    +
    + +


    +

    Method depositRecord()

    +

    Deposits a record on Zenodo.

    +

    Usage

    +

    ZenodoManager$depositRecord(record, publish = FALSE)

    +
    + +
    +

    Arguments

    +

    record
    +

    the record to deposit, object of class ZenodoRecord

    + + +
    publish
    +

    object of class logical indicating if record has to be published (default FALSE). +Can be set to TRUE (to use CAUTIOUSLY, only if you want to publish your record)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if deposited (and eventually published), FALSE otherwise

    +
    + +


    +

    Method depositRecordVersion()

    +

    Deposits a record version on Zenodo. For details about the behavior of this function, + see https://developers.zenodo.org/#new-version

    +

    Usage

    +

    ZenodoManager$depositRecordVersion(
    +  record,
    +  delete_latest_files = TRUE,
    +  files = list(),
    +  publish = FALSE
    +)

    +
    + +
    +

    Arguments

    +

    record
    +

    the record version to deposit, object of class ZenodoRecord

    + + +
    delete_latest_files
    +

    object of class logical indicating if latest files have to be deleted. Default is TRUE

    + + +
    files
    +

    a list of files to be uploaded with the new record version

    + + +
    publish
    +

    object of class logical indicating if record has to be published (default FALSE)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if deposited (and eventually published), FALSE otherwise

    +
    + +


    +

    Method deleteRecord()

    +

    Deletes a record given its ID

    +

    Usage

    +

    ZenodoManager$deleteRecord(recordId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    the ID of the record to be deleted

    + + +

    +
    +
    +

    Returns

    +

    TRUE if deleted, FALSE otherwise

    +
    + +


    +

    Method deleteRecordByDOI()

    +

    Deletes a record by DOI

    +

    Usage

    +

    ZenodoManager$deleteRecordByDOI(doi)

    +
    + +
    +

    Arguments

    +

    doi
    +

    the DOI of the record to be deleted

    + + +

    +
    +
    +

    Returns

    +

    TRUE if deleted, FALSE otherwise

    +
    + +


    +

    Method deleteRecords()

    +

    Deletes all Zenodo deposited (unpublished) records. + The parameter q allows to specify an ElasticSearch-compliant query to filter depositions (default query + is empty to retrieve all records). Examples of ElasticSearch queries for Zenodo can be found at + https://help.zenodo.org/guides/search/.

    +

    Usage

    +

    ZenodoManager$deleteRecords(q = "", size = 10)

    +
    + +
    +

    Arguments

    +

    q
    +

    an ElasticSearch compliant query, object of class character

    + + +
    size
    +

    number of records to be passed to $getDepositions method

    + + +

    +
    +
    +

    Returns

    +

    TRUE if all records have been deleted, FALSE otherwise

    +
    + +


    +

    Method createEmptyRecord()

    +

    Creates an empty record in the Zenodo deposit. Returns the record + newly created in Zenodo, as an object of class ZenodoRecord with an + assigned identifier.

    +

    Usage

    +

    ZenodoManager$createEmptyRecord()

    +
    + +
    +

    Returns

    +

    an object of class ZenodoRecord

    +
    + +


    +

    Method editRecord()

    +

    Unlocks a record already submitted. Required to edit metadata of a Zenodo record already published.

    +

    Usage

    +

    ZenodoManager$editRecord(recordId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    the ID of the record to unlock and set in editing mode.

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord

    +
    + +


    +

    Method discardChanges()

    +

    Discards changes on a Zenodo record.

    +

    Usage

    +

    ZenodoManager$discardChanges(recordId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    the ID of the record for which changes have to be discarded.

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord

    +
    + +


    +

    Method publishRecord()

    +

    Publishes a Zenodo record.

    +

    Usage

    +

    ZenodoManager$publishRecord(recordId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    the ID of the record to be published.

    + + +

    +
    +
    +

    Returns

    +

    an object of class ZenodoRecord

    +
    + +


    +

    Method getFiles()

    +

    Get list of files attached to a Zenodo record.

    +

    Usage

    +

    ZenodoManager$getFiles(recordId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    the ID of the record.

    + + +

    +
    +
    +

    Returns

    +

    list of files

    +
    + +


    +

    Method uploadFile()

    +

    Uploads a file to a Zenodo record

    +

    Usage

    +

    ZenodoManager$uploadFile(path, record = NULL, recordId = NULL)

    +
    + +
    +

    Arguments

    +

    path
    +

    Local path of the file

    + + +
    record
    +

    object of class ZenodoRecord

    + + +
    recordId
    +

    ID of the record. Deprecated, use record instead to take advantage of the new Zenodo bucket upload API.

    + + +

    +
    + +


    +

    Method deleteFile()

    +

    Deletes a file for a record

    +

    Usage

    +

    ZenodoManager$deleteFile(recordId, fileId)

    +
    + +
    +

    Arguments

    +

    recordId
    +

    ID of the record

    + + +
    fileId
    +

    ID of the file to delete

    + + +

    +
    + +


    +

    Method getRecords()

    +

    Get the list of Zenodo records. By defaut the list of records will be returned by + page with a size of 10 results per page (default size of the Zenodo API). The parameter + q allows to specify an ElasticSearch-compliant query to filter depositions + (default query is empty to retrieve all records). The argument all_versions, + if set to TRUE allows to get all versions of records as part of the depositions list. + The argument exact specifies that an exact matching is wished, in which case + paginated search will be disabled (only the first search page will be returned). + Examples of ElasticSearch queries for Zenodo can be found at https://help.zenodo.org/guides/search/.

    +

    Usage

    +

    ZenodoManager$getRecords(
    +  q = "",
    +  size = 10,
    +  all_versions = FALSE,
    +  exact = FALSE
    +)

    +
    + +
    +

    Arguments

    +

    q
    +

    Elastic-Search-compliant query, as object of class character. Default is ""

    + + +
    size
    +

    number of records to be retrieved per request (paginated). Default is 10

    + + +
    all_versions
    +

    object of class logical indicating if all versions of records have to be retrieved. Default is FALSE

    + + +
    exact
    +

    object of class logical indicating if exact matching has to be applied. Default is TRUE

    + + +
    quiet
    +

    object of class logical indicating if logs have to skipped. Default is FALSE

    + + +

    +
    +
    +

    Returns

    +

    a list of ZenodoRecord

    +
    + +


    +

    Method getRecordByConceptDOI()

    +

    Get Record by concept DOI

    +

    Usage

    +

    ZenodoManager$getRecordByConceptDOI(conceptdoi)

    +
    + +
    +

    Arguments

    +

    conceptdoi
    +

    the concept DOI

    + + +

    +
    +
    +

    Returns

    +

    a object of class ZenodoRecord

    +
    + +


    +

    Method getRecordByDOI()

    +

    Get Record by DOI

    +

    Usage

    +

    ZenodoManager$getRecordByDOI(doi)

    +
    + +
    +

    Arguments

    +

    doi
    +

    the DOI

    + + +

    +
    +
    +

    Returns

    +

    a object of class ZenodoRecord

    +
    + +


    +

    Method getRecordById()

    +

    Get Record by ID

    +

    Usage

    +

    ZenodoManager$getRecordById(recid)

    +
    + +
    +

    Arguments

    +

    recid
    +

    the record ID

    + + +

    +
    +
    +

    Returns

    +

    a object of class ZenodoRecord

    +
    + +


    +

    Method getRecordByConceptId()

    +

    Get Record by concept ID

    +

    Usage

    +

    ZenodoManager$getRecordByConceptId(conceptrecid)

    +
    + +
    +

    Arguments

    +

    conceptrecid
    +

    the concept ID

    + + +

    +
    +
    +

    Returns

    +

    a object of class ZenodoRecord

    +
    + +


    +

    Method clone()

    +

    The objects of this class are cloneable with this method.

    +

    Usage

    +

    ZenodoManager$clone(deep = FALSE)

    +
    + +
    +

    Arguments

    +

    deep
    +

    Whether to make a deep clone.

    + + +

    +
    + +
    + +
    + +
    +

    Examples

    +
    if (FALSE) {
    +  ZENODO <- ZenodoManager$new(
    +     url = "https://sandbox.zenodo.org/api",
    +     token = "<your_token>",
    +     logger = "INFO"
    +  )
    +  
    +  #create (deposit) an empty record
    +  newRec <- ZENODO$createEmptyRecord()
    +  
    +  #create and fill a local (not yet deposited) record
    +  myrec <- ZenodoRecord$new()
    +  myrec$setTitle("my R package")
    +  myrec$setDescription("A description of my R package")
    +  myrec$setUploadType("software")
    +  myrec$addCreator(
    +    firstname = "John", lastname = "Doe",
    +    affiliation = "Independent", orcid = "0000-0000-0000-0000"
    +   )
    +  myrec$setLicense("mit")
    +  myrec$setAccessRight("open")
    +  myrec$setDOI("mydoi") #use this method if your DOI has been assigned elsewhere, outside Zenodo
    +  myrec$addCommunity("ecfunded")
    +  
    +  #deposit the record 
    +  myrec <- ZENODO$depositRecord(myrec)
    +  
    +  #publish a record (with caution!!)
    +  #this method will PUBLISH the deposition done earlier
    +  ZENODO$publishRecord(myrec$id)
    +  #With even more caution the publication can be done with a shortcut argument at deposit time
    +  ZENODO$depositRecord(myrec, publish = TRUE)
    +  
    +  #delete a record (by id)
    +  #this methods only works for unpublished deposits 
    +  #(if a record is published, it cannot be deleted anymore!)
    +  ZENODO$deleteRecord(myrec$id)
    +  
    +  #HOW TO UPLOAD FILES to a deposit
    +  
    +  #upload a file
    +  ZENODO$uploadFile("path/to/your/file", record = myrec)
    +  
    +  #list files
    +  zen_files <- ZENODO$getFiles(myrec$id)
    +  
    +  #delete a file?
    +  ZENODO$deleteFile(myrec$id, zen_files[[1]]$id)
    +}
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/ZenodoRecord.html b/docs/reference/ZenodoRecord.html new file mode 100644 index 0000000..bb160e4 --- /dev/null +++ b/docs/reference/ZenodoRecord.html @@ -0,0 +1,2038 @@ + +ZenodoRecord — ZenodoRecord • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    ZenodoRecord

    +

    ZenodoRecord

    +
    + + +
    +

    Format

    +

    R6Class object.

    +
    +
    +

    Value

    +

    Object of R6Class for modelling an ZenodoRecord

    +
    +
    +

    Note

    +

    See examples in download_zenodo utility function.

    +
    +
    +

    Author

    +

    Emmanuel Blondel <emmanuel.blondel1@gmail.com>

    +
    +
    +

    Super class

    +

    zen4R::zen4RLogger -> ZenodoRecord

    +
    +
    +

    Public fields

    +

    conceptdoi
    +

    record Concept DOI (common to all record versions)

    + + +
    conceptrecid
    +

    record concept id

    + + +
    created
    +

    record creation date

    + + +
    doi
    +

    record doi

    + + +
    doi_url
    +

    record doi URL

    + + +
    files
    +

    list of files associated to the record

    + + +
    id
    +

    record id

    + + +
    links
    +

    list of links associated to the record

    + + +
    metadata
    +

    metadata elements associated to the record

    + + +
    modified
    +

    record modification date

    + + +
    owner
    +

    record owner

    + + +
    record_id
    +

    record_id

    + + +
    state
    +

    record state

    + + +
    submitted
    +

    record submission status

    + + +
    title
    +

    record title

    + + +
    version
    +

    record version

    + + +

    +
    +
    +

    Methods

    + +
    +

    Public methods

    + +

    Inherited methods


    +

    Method new()

    +

    method is used to instantiate a ZenodoRecord

    +

    Usage

    +

    ZenodoRecord$new(obj = NULL, logger = "INFO")

    +
    + +
    +

    Arguments

    +

    obj
    +

    an optional list object to create the record

    + + +
    logger
    +

    a logger to print log messages. It can be either NULL, "INFO" (with minimum logs), +or "DEBUG" (for complete curl http calls logs)

    + + +

    +
    + +


    +

    Method prereserveDOI()

    +

    Set prereserve_doi if TRUE, FALSE otherwise to create a record without + prereserved DOI by Zenodo. By default, this method will be called to prereserve a DOI assuming + the record created doesn't yet handle a DOI. To avoid prereserving a DOI call $prereserveDOI(FALSE) + on your record.

    +

    Usage

    +

    ZenodoRecord$prereserveDOI(prereserve)

    +
    + +
    +

    Arguments

    +

    prereserve
    +

    whether a DOI has to be pre-reserved by Zenodo

    + + +

    +
    + +


    +

    Method setDOI()

    +

    Set the DOI. This method can be used if a DOI has been already assigned outside Zenodo. + This method will call the method $prereserveDOI(FALSE).

    +

    Usage

    +

    ZenodoRecord$setDOI(doi)

    +
    + +
    +

    Arguments

    +

    doi
    +

    DOI to set for the record

    + + +

    +
    + +


    +

    Method getConceptDOI()

    +

    Get the concept (generic) DOI. The concept DOI is a generic DOI common to all versions + of a Zenodo record. When a deposit is unsubmitted, this concept DOI is inherited based + on the prereserved DOI of the first record version.

    +

    Usage

    +

    ZenodoRecord$getConceptDOI()

    +
    + +
    +

    Returns

    +

    the concept DOI, object of class character

    +
    + +


    +

    Method getFirstDOI()

    +

    Get DOI of the first record version.

    +

    Usage

    +

    ZenodoRecord$getFirstDOI()

    +
    + +
    +

    Returns

    +

    the first DOI, object of class character

    +
    + +


    +

    Method getLastDOI()

    +

    Get DOI of the latest record version.

    +

    Usage

    +

    ZenodoRecord$getLastDOI()

    +
    + +
    +

    Returns

    +

    the last DOI, object of class character

    +
    + +


    +

    Method getVersions()

    +

    Get record versions with creation/publication date, + version (ordering number) and DOI.

    +

    Usage

    +

    ZenodoRecord$getVersions()

    +
    + +
    +

    Returns

    +

    a data.frame with the record versions

    +
    + +


    +

    Method setUploadType()

    +

    Set the upload type (mandatory).

    +

    Usage

    +

    ZenodoRecord$setUploadType(uploadType)

    +
    + +
    +

    Arguments

    +

    uploadType
    +

    record upload type among the following values: 'publication', +'poster','presentation','dataset','image','video', or 'software'

    + + +

    +
    + +


    +

    Method setPublicationType()

    +

    Set the publication type (mandatory if upload type is 'publication').

    +

    Usage

    +

    ZenodoRecord$setPublicationType(publicationType)

    +
    + +
    +

    Arguments

    +

    publicationType
    +

    record publication type among the following values: 'book','section', +'conferencepaper','article','patent','preprint','report','softwaredocumentation','thesis', +'technicalnote','workingpaper', or 'other'

    + + +

    +
    + +


    +

    Method setImageType()

    +

    Set the image type (mandatory if image type is 'image').

    +

    Usage

    +

    ZenodoRecord$setImageType(imageType)

    +
    + +
    +

    Arguments

    +

    imageType
    +

    record publication type among the following values: 'figure','plot', +'drawing','diagram','photo', or 'other'

    + + +

    +
    + +


    +

    Method setPublicationDate()

    +

    Set the publication date.

    +

    Usage

    +

    ZenodoRecord$setPublicationDate(publicationDate)

    +
    + +
    +

    Arguments

    +

    publicationDate
    +

    object of class Date

    + + +

    +
    + +


    +

    Method setEmbargoDate()

    +

    Set the embargo date.

    +

    Usage

    +

    ZenodoRecord$setEmbargoDate(embargoDate)

    +
    + +
    +

    Arguments

    +

    embargoDate
    +

    object of class Date

    + + +

    +
    + +


    +

    Method setTitle()

    +

    Set the record title.

    +

    Usage

    +

    ZenodoRecord$setTitle(title)

    +
    + +
    +

    Arguments

    +

    title
    +

    object of class character

    + + +

    +
    + +


    +

    Method setDescription()

    +

    Set the record description

    +

    Usage

    +

    ZenodoRecord$setDescription(description)

    +
    + +
    +

    Arguments

    +

    description
    +

    object of class character

    + + +

    +
    + +


    +

    Method setAccessRight()

    +

    Set the access right.

    +

    Usage

    +

    ZenodoRecord$setAccessRight(accessRight)

    +
    + +
    +

    Arguments

    +

    accessRight
    +

    record access right among the following values: 'open','embargoed', 'restricted','closed'

    + + +

    +
    + +


    +

    Method setAccessConditions()

    +

    set the access conditions.

    +

    Usage

    +

    ZenodoRecord$setAccessConditions(accessConditions)

    +
    + +
    +

    Arguments

    +

    accessConditions
    +

    object of class character

    + + +

    +
    + +


    +

    Method addCreator()

    +

    Add a creator for the record. One approach is to use the firstname and + lastname arguments, that by default will be concatenated for Zenodo as + lastname, firstname. For more flexibility over this, the name + argument can be directly used.

    +

    Usage

    +

    ZenodoRecord$addCreator(
    +  firstname,
    +  lastname,
    +  name = paste(lastname, firstname, sep = ", "),
    +  affiliation = NULL,
    +  orcid = NULL,
    +  gnd = NULL
    +)

    +
    + +
    +

    Arguments

    +

    firstname
    +

    creator first name

    + + +
    lastname
    +

    creator last name

    + + +
    name
    +

    creator name

    + + +
    affiliation
    +

    creator affiliation (optional)

    + + +
    orcid
    +

    creator ORCID (optional)

    + + +
    gnd
    +

    creator GND (optional)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeCreator()

    +

    Removes a creator by a property. The by parameter should be the name + of the creator property ('name' - in the form 'lastname, firstname', 'affiliation', + 'orcid' or 'gnd').

    +

    Usage

    +

    ZenodoRecord$removeCreator(by, property)

    +
    + +
    +

    Arguments

    +

    by
    +

    property used as criterion to remove the creator

    + + +
    property
    +

    property value used to remove the creator

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeCreatorByName()

    +

    Removes a creator by name.

    +

    Usage

    +

    ZenodoRecord$removeCreatorByName(name)

    +
    + +
    +

    Arguments

    +

    name
    +

    creator name

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeCreatorByAffiliation()

    +

    Removes a creator by affiliation.

    +

    Usage

    +

    ZenodoRecord$removeCreatorByAffiliation(affiliation)

    +
    + +
    +

    Arguments

    +

    affiliation
    +

    creator affiliation

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeCreatorByORCID()

    +

    Removes a creator by ORCID.

    +

    Usage

    +

    ZenodoRecord$removeCreatorByORCID(orcid)

    +
    + +
    +

    Arguments

    +

    orcid
    +

    creator ORCID

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeCreatorByGND()

    +

    Removes a creator by GND.

    +

    Usage

    +

    ZenodoRecord$removeCreatorByGND(gnd)

    +
    + +
    +

    Arguments

    +

    gnd
    +

    creator GND

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method addContributor()

    +

    Add a contributor for the record. Firstname, lastname, and type are mandatory.

    +

    Usage

    +

    ZenodoRecord$addContributor(
    +  firstname,
    +  lastname,
    +  type,
    +  affiliation = NULL,
    +  orcid = NULL,
    +  gnd = NULL
    +)

    +
    + +
    +

    Arguments

    +

    firstname
    +

    contributor first name

    + + +
    lastname
    +

    contributor last name

    + + +
    type
    +

    contributor type, among values: ContactPerson, +DataCollector, DataCurator, DataManager, Distributor, Editor, Funder, HostingInstitution, +Producer, ProjectLeader, ProjectManager, ProjectMember, RegistrationAgency, RegistrationAuthority, +RelatedPerson, Researcher, ResearchGroup, RightsHolder, Supervisor, Sponsor, WorkPackageLeader, Other.

    + + +
    affiliation
    +

    contributor affiliation (optional)

    + + +
    orcid
    +

    contributor orcid (optional)

    + + +
    gnd
    +

    contributor gnd (optional)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeContributor()

    +

    Removes a contributor by a property. The by parameter should be the name + of the contributor property ('name' - in the form 'lastname, firstname', 'affiliation', + 'orcid' or 'gnd'). + FALSE otherwise.

    +

    Usage

    +

    ZenodoRecord$removeContributor(by, property)

    +
    + +
    +

    Arguments

    +

    by
    +

    property used as criterion to remove the contributor

    + + +
    property
    +

    property value used to remove the contributor

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeContributorByName()

    +

    Removes a contributor by name.

    +

    Usage

    +

    ZenodoRecord$removeContributorByName(name)

    +
    + +
    +

    Arguments

    +

    name
    +

    contributor name

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeContributorByAffiliation()

    +

    Removes a contributor by affiliation.

    +

    Usage

    +

    ZenodoRecord$removeContributorByAffiliation(affiliation)

    +
    + +
    +

    Arguments

    +

    affiliation
    +

    contributor affiliation

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeContributorByORCID()

    +

    Removes a contributor by ORCID.

    +

    Usage

    +

    ZenodoRecord$removeContributorByORCID(orcid)

    +
    + +
    +

    Arguments

    +

    orcid
    +

    contributor ORCID

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeContributorByGND()

    +

    Removes a contributor by GND.

    +

    Usage

    +

    ZenodoRecord$removeContributorByGND(gnd)

    +
    + +
    +

    Arguments

    +

    gnd
    +

    contributor GND

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method setLicense()

    +

    Set license. The license should be set with the Zenodo id of the license. If not + recognized by Zenodo, the function will return an error. The list of licenses can + fetched with the ZenodoManager and the function $getLicenses().

    +

    Usage

    +

    ZenodoRecord$setLicense(licenseId)

    +
    + +
    +

    Arguments

    +

    licenseId
    +

    a license Id

    + + +

    +
    + +


    +

    Method setVersion()

    +

    Set record version.

    +

    Usage

    +

    ZenodoRecord$setVersion(version)

    +
    + +
    +

    Arguments

    +

    version
    +

    the record version to set

    + + +

    +
    + +


    +

    Method setLanguage()

    +

    Set the language.

    +

    Usage

    +

    ZenodoRecord$setLanguage(language)

    +
    + +
    +

    Arguments

    +

    language
    +

    ISO 639-2 or 639-3 code

    + + +

    +
    + +


    +

    Method addRelatedIdentifier()

    +

    Adds a related identifier with a given relation.

    +

    Usage

    +

    ZenodoRecord$addRelatedIdentifier(relation, identifier)

    +
    + +
    +

    Arguments

    +

    relation
    +

    relation type among following values: isCitedBy, cites, isSupplementTo, +isSupplementedBy, isNewVersionOf, isPreviousVersionOf, isPartOf, hasPart, compiles, +isCompiledBy, isIdenticalTo, isAlternateIdentifier

    + + +
    identifier
    +

    resource identifier

    + + +

    +
    + +


    +

    Method removeRelatedIdentifier()

    +

    Removes a related identifier with a given relation.

    +

    Usage

    +

    ZenodoRecord$removeRelatedIdentifier(relation, identifier)

    +
    + +
    +

    Arguments

    +

    relation
    +

    relation type among following values: isCitedBy, cites, isSupplementTo, +isSupplementedBy, isNewVersionOf, isPreviousVersionOf, isPartOf, hasPart, compiles, +isCompiledBy, isIdenticalTo, isAlternateIdentifier

    + + +
    identifier
    +

    resource identifier

    + + +

    +
    + +


    +

    Method setReferences()

    +

    Set references

    +

    Usage

    +

    ZenodoRecord$setReferences(references)

    +
    + +
    +

    Arguments

    +

    references
    +

    a vector or list of references to set for the record

    + + +

    +
    + +


    +

    Method addReference()

    +

    Add a reference

    +

    Usage

    +

    ZenodoRecord$addReference(reference)

    +
    + +
    +

    Arguments

    +

    reference
    +

    the reference to add

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeReference()

    +

    Remove a reference

    +

    Usage

    +

    ZenodoRecord$removeReference(reference)

    +
    + +
    +

    Arguments

    +

    reference
    +

    the reference to remove

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method setKeywords()

    +

    Set keywords

    +

    Usage

    +

    ZenodoRecord$setKeywords(keywords)

    +
    + +
    +

    Arguments

    +

    keywords
    +

    a vector or list of keywords to set for the record

    + + +

    +
    + +


    +

    Method addKeyword()

    +

    Add a keyword

    +

    Usage

    +

    ZenodoRecord$addKeyword(keyword)

    +
    + +
    +

    Arguments

    +

    keyword
    +

    the keyword to add

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeKeyword()

    +

    Remove a keyword

    +

    Usage

    +

    ZenodoRecord$removeKeyword(keyword)

    +
    + +
    +

    Arguments

    +

    keyword
    +

    the keyword to remove

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method addSubject()

    +

    Adds a subject given a term and identifier

    +

    Usage

    +

    ZenodoRecord$addSubject(term, identifier)

    +
    + +
    +

    Arguments

    +

    term
    +

    subject term

    + + +
    identifier
    +

    subject identifier

    + + +

    +
    + +


    +

    Method removeSubject()

    +

    Removes subject(s) by a property. The by parameter should be the name + of the subject property ('term' or 'identifier').

    +

    Usage

    +

    ZenodoRecord$removeSubject(by, property)

    +
    + +
    +

    Arguments

    +

    by
    +

    property used as criterion to remove subjects

    + + +
    property
    +

    property value used to remove subjects

    + + +

    +
    +
    +

    Returns

    +

    TRUE if at least one subject is removed, FALSE otherwise.

    +
    + +


    +

    Method removeSubjectByTerm()

    +

    Removes subject(s) by term.

    +

    Usage

    +

    ZenodoRecord$removeSubjectByTerm(term)

    +
    + +
    +

    Arguments

    +

    term
    +

    the term to use to remove subject(s)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if at least one subject is removed, FALSE otherwise.

    +
    + +


    +

    Method removeSubjectByIdentifier()

    +

    Removes subject(s) by identifier

    +

    Usage

    +

    ZenodoRecord$removeSubjectByIdentifier(identifier)

    +
    + +
    +

    Arguments

    +

    identifier
    +

    the identifier to use to remove subject(s)

    + + +

    +
    +
    +

    Returns

    +

    TRUE if at least one subject is removed, FALSE otherwise.

    +
    + +


    +

    Method setNotes()

    +

    Set notes. HTML is not allowed

    +

    Usage

    +

    ZenodoRecord$setNotes(notes)

    +
    + +
    +

    Arguments

    +

    notes
    +

    object of class character

    + + +

    +
    + +


    +

    Method setCommunities()

    +

    Set a vector of character strings identifying communities

    +

    Usage

    +

    ZenodoRecord$setCommunities(communities)

    +
    + +
    +

    Arguments

    +

    communities
    +

    a vector or list of communities. Values should among known communities. The list of communities can +fetched with the ZenodoManager and the function $getCommunities(). Each community should be set with +the Zenodo id of the community. If not recognized by Zenodo, the function will return an error.

    + + +

    +
    + +


    +

    Method addCommunity()

    +

    Adds a community to the record metadata.

    +

    Usage

    +

    ZenodoRecord$addCommunity(community)

    +
    + +
    +

    Arguments

    +

    community
    +

    community to add. The community should be set with the Zenodo id of the community. +If not recognized by Zenodo, the function will return an error. The list of communities can fetched +with the ZenodoManager and the function $getCommunities().

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeCommunity()

    +

    Removes a community from the record metadata.

    +

    Usage

    +

    ZenodoRecord$removeCommunity(community)

    +
    + +
    +

    Arguments

    +

    community
    +

    community to remove. The community should be set with the Zenodo id of the community.

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method setGrants()

    +

    Set a vector of character strings identifying grants

    +

    Usage

    +

    ZenodoRecord$setGrants(grants)

    +
    + +
    +

    Arguments

    +

    grants
    +

    a vector or list of grants Values should among known grants The list of grants can +fetched with the ZenodoManager and the function $getGrants(). Each grant should be set with +the Zenodo id of the grant If not recognized by Zenodo, the function will raise a warning only.

    + + +

    +
    + +


    +

    Method addGrant()

    +

    Adds a grant to the record metadata.

    +

    Usage

    +

    ZenodoRecord$addGrant(grant)

    +
    + +
    +

    Arguments

    +

    grant
    +

    grant to add. The grant should be set with the id of the grant. If not +recognized by Zenodo, the function will return an warning only. The list of grants can +fetched with the ZenodoManager and the function $getGrants().

    + + +

    +
    +
    +

    Returns

    +

    TRUE if added, FALSE otherwise

    +
    + +


    +

    Method removeGrant()

    +

    Removes a grant from the record metadata.

    +

    Usage

    +

    ZenodoRecord$removeGrant(grant)

    +
    + +
    +

    Arguments

    +

    grant
    +

    grant to remove. The grant should be set with the Zenodo id of the grant

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method setJournalTitle()

    +

    Set Journal title to the record metadata

    +

    Usage

    +

    ZenodoRecord$setJournalTitle(title)

    +
    + +
    +

    Arguments

    +

    title
    +

    a title, object of class character

    + + +

    +
    + +


    +

    Method setJournalVolume()

    +

    Set Journal volume to the record metadata

    +

    Usage

    +

    ZenodoRecord$setJournalVolume(volume)

    +
    + +
    +

    Arguments

    +

    volume
    +

    a volume

    + + +

    +
    + +


    +

    Method setJournalIssue()

    +

    Set Journal issue to the record metadata

    +

    Usage

    +

    ZenodoRecord$setJournalIssue(issue)

    +
    + +
    +

    Arguments

    +

    issue
    +

    an issue

    + + +

    +
    + +


    +

    Method setJournalPages()

    +

    Set Journal pages to the record metadata

    +

    Usage

    +

    ZenodoRecord$setJournalPages(pages)

    +
    + +
    +

    Arguments

    +

    pages
    +

    number of pages

    + + +

    +
    + +


    +

    Method setConferenceTitle()

    +

    Set conference title to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceTitle(title)

    +
    + +
    +

    Arguments

    +

    title
    +

    conference title, object of class character

    + + +

    +
    + +


    +

    Method setConferenceAcronym()

    +

    Set conference acronym to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceAcronym(acronym)

    +
    + +
    +

    Arguments

    +

    acronym
    +

    conference acronym, object of class character

    + + +

    +
    + +


    +

    Method setConferenceDates()

    +

    Set conference dates to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceDates(dates)

    +
    + +
    +

    Arguments

    +

    dates
    +

    conference dates, object of class character

    + + +

    +
    + +


    +

    Method setConferencePlace()

    +

    Set conference place to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferencePlace(place)

    +
    + +
    +

    Arguments

    +

    place
    +

    conference place, object of class character

    + + +

    +
    + +


    +

    Method setConferenceUrl()

    +

    Set conference url to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceUrl(url)

    +
    + +
    +

    Arguments

    +

    url
    +

    conference url, object of class character

    + + +

    +
    + +


    +

    Method setConferenceSession()

    +

    Set conference session to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceSession(session)

    +
    + +
    +

    Arguments

    +

    session
    +

    conference session, object of class character

    + + +

    +
    + +


    +

    Method setConferenceSessionPart()

    +

    Set conference session part to the record metadata

    +

    Usage

    +

    ZenodoRecord$setConferenceSessionPart(part)

    +
    + +
    +

    Arguments

    +

    part
    +

    conference session part, object of class character

    + + +

    +
    + +


    +

    Method setImprintPublisher()

    +

    Set imprint publisher to the record metadata

    +

    Usage

    +

    ZenodoRecord$setImprintPublisher(publisher)

    +
    + +
    +

    Arguments

    +

    publisher
    +

    the publisher, object of class character

    + + +

    +
    + +


    +

    Method setImprintISBN()

    +

    Set imprint ISBN to the record metadata

    +

    Usage

    +

    ZenodoRecord$setImprintISBN(isbn)

    +
    + +
    +

    Arguments

    +

    isbn
    +

    the ISBN, object of class character

    + + +

    +
    + +


    +

    Method setImprintPlace()

    +

    Set imprint place to the record metadata

    +

    Usage

    +

    ZenodoRecord$setImprintPlace(place)

    +
    + +
    +

    Arguments

    +

    place
    +

    the place, object of class character

    + + +

    +
    + +


    +

    Method setPartofTitle()

    +

    Set title to which record is part of

    +

    Usage

    +

    ZenodoRecord$setPartofTitle(title)

    +
    + +
    +

    Arguments

    +

    title
    +

    the title, object of class character

    + + +

    +
    + +


    +

    Method setPartofPages()

    +

    Set pages to which record is part of

    +

    Usage

    +

    ZenodoRecord$setPartofPages(pages)

    +
    + +
    +

    Arguments

    +

    pages
    +

    the pages, object of class character

    + + +

    +
    + +


    +

    Method setThesisUniversity()

    +

    Set thesis university

    +

    Usage

    +

    ZenodoRecord$setThesisUniversity(university)

    +
    + +
    +

    Arguments

    +

    university
    +

    the university, object of class character

    + + +

    +
    + +


    +

    Method addThesisSupervisor()

    +

    Adds thesis supervisor

    +

    Usage

    +

    ZenodoRecord$addThesisSupervisor(
    +  firstname,
    +  lastname,
    +  affiliation = NULL,
    +  orcid = NULL,
    +  gnd = NULL
    +)

    +
    + +
    +

    Arguments

    +

    firstname
    +

    supervisor first name

    + + +
    lastname
    +

    supervisor last name

    + + +
    affiliation
    +

    supervisor affiliation (optional)

    + + +
    orcid
    +

    supervisor ORCID (optional)

    + + +
    gnd
    +

    supervisor GND (optional)

    + + +

    +
    + +


    +

    Method removeThesisSupervisor()

    +

    Removes a thesis supervisor by a property. The by parameter should be the name + of the thesis supervisor property ('name' - in the form 'lastname, firstname', 'affiliation', + 'orcid' or 'gnd').

    +

    Usage

    +

    ZenodoRecord$removeThesisSupervisor(by, property)

    +
    + +
    +

    Arguments

    +

    by
    +

    property used as criterion to remove the thesis supervisor

    + + +
    property
    +

    property value used to remove the thesis supervisor

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeThesisSupervisorByName()

    +

    Removes a thesis supervisor by name.

    +

    Usage

    +

    ZenodoRecord$removeThesisSupervisorByName(name)

    +
    + +
    +

    Arguments

    +

    name
    +

    thesis supervisor name

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeThesisSupervisorByAffiliation()

    +

    Removes a thesis supervisor by affiliation

    +

    Usage

    +

    ZenodoRecord$removeThesisSupervisorByAffiliation(affiliation)

    +
    + +
    +

    Arguments

    +

    affiliation
    +

    thesis supervisor affiliation

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeThesisSupervisorByORCID()

    +

    Removes a thesis supervisor by ORCID

    +

    Usage

    +

    ZenodoRecord$removeThesisSupervisorByORCID(orcid)

    +
    + +
    +

    Arguments

    +

    orcid
    +

    thesis supervisor ORCID

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method removeThesisSupervisorByGND()

    +

    Removes a thesis supervisor by GND

    +

    Usage

    +

    ZenodoRecord$removeThesisSupervisorByGND(gnd)

    +
    + +
    +

    Arguments

    +

    gnd
    +

    thesis supervisor GND

    + + +

    +
    +
    +

    Returns

    +

    TRUE if removed, FALSE otherwise

    +
    + +


    +

    Method exportAs()

    +

    Exports record to a file by format.

    +

    Usage

    +

    ZenodoRecord$exportAs(format, filename, append_format = TRUE)

    +
    + +
    +

    Arguments

    +

    format
    +

    the export format to use. Possibles values are: BibTeX, CSL, DataCite, DublinCore, DCAT, +JSON, JSON-LD, GeoJSON, MARCXML

    + + +
    filename
    +

    the target filename (without extension)

    + + +
    append_format
    +

    wether format name has to be appended to the filename. Default is TRUE (for +backward compatibility reasons). Set it to FALSE if you want to use only the filename.

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsBibTeX()

    +

    Exports record as BibTeX

    +

    Usage

    +

    ZenodoRecord$exportAsBibTeX(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsCSL()

    +

    Exports record as CSL

    +

    Usage

    +

    ZenodoRecord$exportAsCSL(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsDataCite()

    +

    Exports record as DataCite

    +

    Usage

    +

    ZenodoRecord$exportAsDataCite(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsDublinCore()

    +

    Exports record as DublinCore

    +

    Usage

    +

    ZenodoRecord$exportAsDublinCore(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsDCAT()

    +

    Exports record as DCAT

    +

    Usage

    +

    ZenodoRecord$exportAsDCAT(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsJSON()

    +

    Exports record as JSON

    +

    Usage

    +

    ZenodoRecord$exportAsJSON(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsJSONLD()

    +

    Exports record as JSONLD

    +

    Usage

    +

    ZenodoRecord$exportAsJSONLD(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    + +


    +

    Method exportAsGeoJSON()

    +

    Exports record as GeoJSON

    +

    Usage

    +

    ZenodoRecord$exportAsGeoJSON(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsMARCXML()

    +

    Exports record as MARCXML

    +

    Usage

    +

    ZenodoRecord$exportAsMARCXML(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    +
    +

    Returns

    +

    the writen file name (with extension)

    +
    + +


    +

    Method exportAsAllFormats()

    +

    Exports record in all Zenodo record export formats. This function will + create one file per Zenodo metadata formats.

    +

    Usage

    +

    ZenodoRecord$exportAsAllFormats(filename)

    +
    + +
    +

    Arguments

    +

    filename
    +

    the target filename (without extension)

    + + +

    +
    + +


    +

    Method listFiles()

    +

    list files attached to the record

    +

    Usage

    +

    ZenodoRecord$listFiles(pretty = TRUE)

    +
    + +
    +

    Arguments

    +

    pretty
    +

    whether a pretty output (data.frame) should be returned (default TRUE), otherwise +the raw list of files is returned.

    + + +

    +
    +
    +

    Returns

    +

    the files, as data.frame or list

    +
    + +


    +

    Method downloadFiles()

    +

    Downloads files attached to the record

    +

    Usage

    +

    ZenodoRecord$downloadFiles(
    +  path = ".",
    +  files = list(),
    +  parallel = FALSE,
    +  parallel_handler = NULL,
    +  cl = NULL,
    +  quiet = FALSE,
    +  ...
    +)

    +
    + +
    +

    Arguments

    +

    path
    +

    target download path (by default it will be the current working directory)

    + + +
    files
    +

    (list of) file(s) to download. If not specified, by default all files will be downloaded.

    + + +
    parallel
    +

    whether download has to be done in parallel using the chosen parallel_handler. Default is FALSE

    + + +
    parallel_handler
    +

    The parallel handler to use eg. mclapply. To use a different parallel handler (such as eg +parLapply or parSapply), specify its function in parallel_handler argument. For cluster-based parallel +download, this is the way to proceed. In that case, the cluster should be created earlier by the user with makeCluster +and passed as cl argument. After downloading all files, the cluster will be stopped automatically.

    + + +
    cl
    +

    an optional cluster for cluster-based parallel handlers

    + + +
    quiet
    +

    (default is FALSE) can be set to suppress informative messages (not warnings).

    + + +
    ...
    +

    arguments inherited from parallel::mclapply or the custom parallel_handler +can be added (eg. mc.cores for mclapply)

    + + +

    +
    + +


    +

    Method print()

    +

    Prints a ZenodoRecord

    +

    Usage

    +

    ZenodoRecord$print(..., format = "internal", depth = 1)

    +
    + +
    +

    Arguments

    +

    ...
    +

    any other parameter. Not used

    + + +
    format
    +

    format to use for printing. By default, internal uses an zen4R internal +printing method. Other methods available are those supported by Zenodo for record export, and can be used +only if the record has already been published (with a DOI). Attemps to print using a Zenodo export format +for a record will raise a warning message and revert to "internal" format

    + + +
    depth
    +

    an internal depth parameter for indentation of print statements, in case of listing or recursive use of print

    + + +

    +
    + +


    +

    Method toDCEntry()

    +

    Maps to an atom4R DCEntry. Note: applies only to published records.

    +

    Usage

    +

    ZenodoRecord$toDCEntry()

    +
    + +
    +

    Returns

    +

    an object of class DCEntry

    +
    + +


    +

    Method clone()

    +

    The objects of this class are cloneable with this method.

    +

    Usage

    +

    ZenodoRecord$clone(deep = FALSE)

    +
    + +
    +

    Arguments

    +

    deep
    +

    Whether to make a deep clone.

    + + +

    +
    + +
    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/ZenodoRequest.html b/docs/reference/ZenodoRequest.html new file mode 100644 index 0000000..dad7090 --- /dev/null +++ b/docs/reference/ZenodoRequest.html @@ -0,0 +1,269 @@ + +ZenodoRequest — ZenodoRequest • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    ZenodoRequest

    +

    ZenodoRequest

    +
    + + +
    +

    Format

    +

    R6Class object.

    +
    +
    +

    Value

    +

    Object of R6Class for modelling a generic Zenodo request

    +
    +
    +

    Note

    +

    Abstract class used internally by zen4R

    +
    +
    +

    Author

    +

    Emmanuel Blondel <emmanuel.blondel1@gmail.com>

    +
    +
    +

    Super class

    +

    zen4R::zen4RLogger -> ZenodoRequest

    +
    +
    +

    Methods

    + +

    Inherited methods


    +

    Method new()

    +

    Initializes a ZenodoRequest

    +

    Usage

    +

    ZenodoRequest$new(
    +  url,
    +  type,
    +  request,
    +  data = NULL,
    +  file = NULL,
    +  token,
    +  logger = NULL,
    +  ...
    +)

    +
    + +
    +

    Arguments

    +

    url
    +

    request URL

    + + +
    type
    +

    Type of request: 'GET', 'POST', 'PUT', 'DELETE'

    + + +
    request
    +

    the method request

    + + +
    data
    +

    payload (optional)

    + + +
    file
    +

    to be uploaded (optional)

    + + +
    token
    +

    user token

    + + +
    logger
    +

    the logger type

    + + +
    ...
    +

    any other arg

    + + +

    +
    + +


    +

    Method execute()

    +

    Executes the request

    +

    Usage

    +

    ZenodoRequest$execute()

    +
    + + +


    +

    Method getRequest()

    +

    Get request

    +

    Usage

    +

    ZenodoRequest$getRequest()

    +
    + + +


    +

    Method getRequestHeaders()

    +

    Get request headers

    +

    Usage

    +

    ZenodoRequest$getRequestHeaders()

    +
    + + +


    +

    Method getStatus()

    +

    Get request status

    +

    Usage

    +

    ZenodoRequest$getStatus()

    +
    + + +


    +

    Method getResponse()

    +

    Get request response

    +

    Usage

    +

    ZenodoRequest$getResponse()

    +
    + + +


    +

    Method getException()

    +

    Get request exception

    +

    Usage

    +

    ZenodoRequest$getException()

    +
    + + +


    +

    Method getResult()

    +

    Get request result

    +

    Usage

    +

    ZenodoRequest$getResult()

    +
    + + +


    +

    Method setResult()

    +

    Set request result

    +

    Usage

    +

    ZenodoRequest$setResult(result)

    +
    + +
    +

    Arguments

    +

    result
    +

    result to be set

    + + +

    +
    + +


    +

    Method clone()

    +

    The objects of this class are cloneable with this method.

    +

    Usage

    +

    ZenodoRequest$clone(deep = FALSE)

    +
    + +
    +

    Arguments

    +

    deep
    +

    Whether to make a deep clone.

    + + +

    +
    + +
    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/download_zenodo.html b/docs/reference/download_zenodo.html new file mode 100644 index 0000000..d8aeb74 --- /dev/null +++ b/docs/reference/download_zenodo.html @@ -0,0 +1,129 @@ + +download_zenodo — download_zenodo • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    download_zenodo allows to download archives attached to a Zenodo +record, identified by its DOI or concept DOI.

    +
    + +
    +
    download_zenodo(
    +  doi,
    +  path = ".",
    +  files = list(),
    +  logger = NULL,
    +  quiet = FALSE,
    +  ...
    +)
    +
    + +
    +

    Arguments

    +
    doi
    +

    a Zenodo DOI or concept DOI

    +
    path
    +

    the target directory where to download files

    +
    files
    +

    subset of filenames to restrain to download. If ignored, all files will be downloaded.

    +
    logger
    +

    a logger to print Zenodo API-related messages. The logger can be either NULL, +"INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)

    +
    quiet
    +

    Logical (FALSE by default). +Do you want to suppress informative messages (not warnings)?

    +
    ...
    +

    any other arguments for parallel downloading (more information at +ZenodoRecord, downloadFiles() documentation)

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    + #simple download (sequential)   
    + download_zenodo("10.5281/zenodo.2547036")
    + 
    + library(parallel)
    + #download files as parallel using a cluster approach (for both Unix/Win systems)
    + download_zenodo("10.5281/zenodo.2547036", 
    +   parallel = TRUE, parallel_handler = parLapply, cl = makeCluster(2))
    + 
    + #download files as parallel using mclapply (for Unix systems)
    + download_zenodo("10.5281/zenodo.2547036",
    +   parallel = TRUE, parallel_handler = mclapply, mc.cores = 2)
    +}
    +                
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/export_zenodo.html b/docs/reference/export_zenodo.html new file mode 100644 index 0000000..a64c974 --- /dev/null +++ b/docs/reference/export_zenodo.html @@ -0,0 +1,114 @@ + +export_zenodo — export_zenodo • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    export_zenodo allows to export a Zenodo record, identified by its +DOI or concept DOI, using one of the export formats supported by Zenodo.

    +
    + +
    +
    export_zenodo(doi, filename, format, append_format = TRUE, logger = NULL)
    +
    + +
    +

    Arguments

    +
    doi
    +

    a Zenodo DOI or concept DOI

    +
    filename
    +

    a base file name (without file extension) to export to.

    +
    format
    +

    a valid Zenodo export format among the following: BibTeX, CSL, DataCite, DublinCore, +DCAT, JSON, JSON-LD, GeoJSON, MARCXML.

    +
    append_format
    +

    wether format name has to be appended to the filename. Default is TRUE (for +backward compatibility reasons). Set it to FALSE if you want to use only the filename.

    +
    logger
    +

    a logger to print Zenodo API-related messages. The logger can be either NULL, +"INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)

    +
    +
    +

    Value

    +

    the exported file name (with extension)

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    + export_zenodo("10.5281/zenodo.2547036", filename = "test", format = "BibTeX", append_format = F)
    +}
    +                
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/get_versions.html b/docs/reference/get_versions.html new file mode 100644 index 0000000..04b0705 --- /dev/null +++ b/docs/reference/get_versions.html @@ -0,0 +1,105 @@ + +get_versions — get_versions • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    get_versions allows to execute a workflow

    +
    + +
    +
    get_versions(doi, logger = NULL)
    +
    + +
    +

    Arguments

    +
    doi
    +

    a Zenodo DOI or concept DOI

    +
    logger
    +

    a logger to print messages. The logger can be either NULL, +"INFO" (with minimum logs), or "DEBUG" (for complete curl http calls logs)

    +
    +
    +

    Value

    +

    an object of class data.frame giving the record versions +including date, version number and version-specific DOI.

    +
    + +
    +

    Examples

    +
    if (FALSE) {
    +get_versions("10.5281/zenodo.2547036")
    +}
    +                
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/human_filesize.html b/docs/reference/human_filesize.html new file mode 100644 index 0000000..790c7ef --- /dev/null +++ b/docs/reference/human_filesize.html @@ -0,0 +1,106 @@ + +Human-readable binary file size — human_filesize • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    Takes an integer (referring to number of bytes) and returns an optimally +human-readable +binary-prefixed +byte size (KiB, MiB, GiB, TiB, PiB, EiB). +The function is vectorised.

    +
    + +
    +
    human_filesize(x)
    +
    + +
    +

    Arguments

    +
    x
    +

    A positive integer, i.e. the number of bytes (B). +Can be a vector of file sizes.

    +
    +
    +

    Value

    +

    A character vector.

    +
    +
    +

    Author

    +

    Floris Vanderhaeghe, floris.vanderhaeghe@inbo.be

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 0000000..2177454 --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,114 @@ + +Function reference • zen4R + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +

    All functions

    +

    +
    +

    download_zenodo()

    +

    download_zenodo

    +

    export_zenodo()

    +

    export_zenodo

    +

    get_versions()

    +

    get_versions

    +

    zen4R

    +

    Interface to 'Zenodo' REST API

    +

    zen4RLogger

    +

    zen4RLogger

    +

    ZenodoManager

    +

    ZenodoManager

    +

    ZenodoRecord

    +

    ZenodoRecord

    +

    ZenodoRequest

    +

    ZenodoRequest

    +

    zenodo_pat()

    +

    zenodo_pat

    + + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/zen4R.html b/docs/reference/zen4R.html new file mode 100644 index 0000000..4c799ec --- /dev/null +++ b/docs/reference/zen4R.html @@ -0,0 +1,89 @@ + +Interface to 'Zenodo' REST API — zen4R • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    Provides an Interface to 'Zenodo' (<https://zenodo.org>) REST API, + including management of depositions, attribution of DOIs by 'Zenodo', + upload and download of files.

    +
    + + +
    +

    Author

    +

    Emmanuel Blondel emmanuel.blondel1@gmail.com

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/zen4RLogger.html b/docs/reference/zen4RLogger.html new file mode 100644 index 0000000..8756cd4 --- /dev/null +++ b/docs/reference/zen4RLogger.html @@ -0,0 +1,252 @@ + +zen4RLogger — zen4RLogger • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    zen4RLogger

    +

    zen4RLogger

    +
    + + +
    +

    Format

    +

    R6Class object.

    +
    +
    +

    Value

    +

    Object of R6Class for modelling a simple logger

    +
    +
    +

    Note

    +

    Logger class used internally by zen4R

    +
    +
    +

    Public fields

    +

    verbose.info
    +

    logger info status

    + + +
    verbose.debug
    +

    logger debug status

    + + +
    loggerType
    +

    Logger type, either "INFO", "DEBUG" or NULL (if no logger)

    + + +

    +
    +
    +

    Methods

    + +


    +

    Method logger()

    +

    internal logger function for the Zenodo manager

    +

    Usage

    +

    zen4RLogger$logger(type, text)

    +
    + +
    +

    Arguments

    +

    type
    +

    logger message type, "INFO", "WARN", or "ERROR"

    + + +
    text
    +

    log message

    + + +

    +
    + +


    +

    Method INFO()

    +

    internal INFO logger function

    +

    Usage

    +

    zen4RLogger$INFO(text)

    +
    + +
    +

    Arguments

    +

    text
    +

    log message

    + + +

    +
    + +


    +

    Method WARN()

    +

    internal WARN logger function

    +

    Usage

    +

    zen4RLogger$WARN(text)

    +
    + +
    +

    Arguments

    +

    text
    +

    log message

    + + +

    +
    + +


    +

    Method ERROR()

    +

    internal ERROR logger function

    +

    Usage

    +

    zen4RLogger$ERROR(text)

    +
    + +
    +

    Arguments

    +

    text
    +

    log message

    + + +

    +
    + +


    +

    Method new()

    +

    initialize the Zenodo logger

    +

    Usage

    +

    zen4RLogger$new(logger = NULL)

    +
    + +
    +

    Arguments

    +

    logger
    +

    logger type NULL, 'INFO', or 'DEBUG'

    + + +

    +
    + +


    +

    Method getClassName()

    +

    Get object class name

    +

    Usage

    +

    zen4RLogger$getClassName()

    +
    + +
    +

    Returns

    +

    the class name, object of class character

    +
    + +


    +

    Method getClass()

    +

    Get object class

    +

    Usage

    +

    zen4RLogger$getClass()

    +
    + +
    +

    Returns

    +

    the class, object of class R6

    +
    + +


    +

    Method clone()

    +

    The objects of this class are cloneable with this method.

    +

    Usage

    +

    zen4RLogger$clone(deep = FALSE)

    +
    + +
    +

    Arguments

    +

    deep
    +

    Whether to make a deep clone.

    + + +

    +
    + +
    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/zenodo_pat.html b/docs/reference/zenodo_pat.html new file mode 100644 index 0000000..e94c455 --- /dev/null +++ b/docs/reference/zenodo_pat.html @@ -0,0 +1,89 @@ + +zenodo_pat — zenodo_pat • zen4R + + +
    +
    + + + +
    +
    + + +
    +

    Get Zenodo personal access token, looking in env var `ZENODO_PAT`

    +
    + +
    +
    zenodo_pat(quiet = TRUE)
    +
    + +
    +

    Arguments

    +
    quiet
    +

    Hide log message, default is TRUE

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown +2.0.2.

    +
    + +
    + + + + + + + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..59ea830 --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,54 @@ + + + + /404.html + + + /authors.html + + + /CODE_OF_CONDUCT.html + + + /index.html + + + /LICENSE-text.html + + + /news/index.html + + + /reference/download_zenodo.html + + + /reference/export_zenodo.html + + + /reference/get_versions.html + + + /reference/human_filesize.html + + + /reference/index.html + + + /reference/zen4R.html + + + /reference/zen4RLogger.html + + + /reference/ZenodoManager.html + + + /reference/ZenodoRecord.html + + + /reference/ZenodoRequest.html + + + /reference/zenodo_pat.html + +