npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zenodo-cli

v1.0.13

Published

A commandline tool to interact with the Zenodo API. Developed by [@bjohas](https://github.com/bjohas) and [@a1diablo](https://github.com/a1diablo).

Downloads

9

Readme

Note

This package has been deprecated. All functionality available via:

  • zotzen-lib https://github.com/opendeved/zotzen-lib, https://www.npmjs.com/package/zotzen-lib

zenodo-cli

Introduction: Tools for working with the APIs of Zotero and Zenodo (zotzen)

This repository is part of a set of repositories, see here: https://github.com/orgs/OpenDevEd/teams/zotzen-team/repositories. Currently, this set contains a number of libraries

  • zenodo-lib https://github.com/opendeved/zenodo-lib, https://www.npmjs.com/package/zenodo-lib
  • zotero-lib https://github.com/opendeved/zotero-lib, https://www.npmjs.com/package/zotero-lib
  • zotzen-lib https://github.com/opendeved/zotzen-lib, https://www.npmjs.com/package/zotzen-lib

The set contains some command-line tools:

  • zenodo-cli https://github.com/opendeved/zenodo-cli, https://www.npmjs.com/package/zenodo-cli
  • zotero-cli https://github.com/opendeved/zotero-cli, https://www.npmjs.com/package/zotero-cli
  • zotzen-cli https://github.com/opendeved/zotzen-cli, https://www.npmjs.com/package/zotzen-cli

And a web application

  • zotzen-web https://github.com/opendeved/zotzen-web

Zenodo Commandline Interface

Install the Zenodo commandline interface with

npm install -g zenodo-cli

See https://www.npmjs.com/package/zenodo-cli. You can then use zenodo-cli at the commandline as follows

zenodo-cli --help

Information

A commandline tool to interact with the Zenodo API. Developed by @bjohas, Zeina and Sheraz.

The main script is zenodo-cli.

Versions: This repo forms part of a set of repos:

  • https://github.com/bjohas/zenodo-cli-ts
  • https://github.com/edtechhub/zotzen
  • https://github.com/edtechhub/zotero-cli

An earlier version (in python) is available here https://github.com/bjohas/zenodo-cli-python

How Zenodo works

(1a) Record creation

DOI: ......./.100100 <- concept
DOI: ......./.100101 <- record
  • -> add metadata ("create")
  • -> add file ("upload")
  • https://doi.org/......./.100101 is not active
  • -> change metadata ("create")
  • -> add/remove file ("upload")
  • https://doi.org/......./.100101 is not active
  • -> add metadata ("create")
  • -> add file ("upload")
  • https://doi.org/......./.100101 is not active
state: 'unsubmitted',
submitted: false,

(1b) record publishing

  • -> now, https://doi.org/......./.100101 resolves (i.e., the DOI is active).
  • -> At this point, the record is no longer editable (metadata is locked; the file is locked).
  state: 'done',
  submitted: true,

(2) Amending metadata only (without changing the deposited files)

Now suppose, I want to edit the metadata: This is allowed without changing the DOI.

call "makeEditable" and edit the metadata.

publish to make the new metadata live.

  state: 'inprogress',
  submitted: true,

publish

    state: 'done',
    submitted: true,

(3) Changing deposited files:

Now, I want to change the record files. I cannot change the files for ......./.100101, because it has been submitted.

If I now say, newVersion, Zenodo allocates:

  DOI: ......./.222202 <- record
  (Retain DOI: ......./.100100 <- concept)

We then have

    state: 'unsubmitted',
    submitted: false,

After publishing

    state: 'done',
    submitted: true,

Zenodo records have these three states:

Three states

  • state: 'unsubmitted'/submitted: false,

  • state: 'done'/submitted: true,

  • state: 'inprogress'/submitted: true,

    Zenodo has the notion of records and concepts. Both of them have s, e.g. 1341000=concept, 1341001=record, 1341002=record, 1341003=concept, 1341004=record.

    The only thing that is certain is that a concept is always followed by a record .

    The problem is that "?q=conceptrecid:" gives an error for s that are records, while ?q=recid:" gives an error for s that are concepts.

    At the moment 'get' uses "?q=recid:", i.e., we get an error for s that are concepts. However, the user doesn't know whether is a record or a concept...

    To work around this, we need to make our query as follows: "?q=conceptrecid: OR recid:".

    This will always return some json. The user then needs to work out whether it's a concept or a record.