Upload RO-Crates to Zenodo and automatically fill the Zenodo metadata
Project description
ro-crate-zenodo
Upload RO-Crates to Zenodo and automatically fill the Zenodo metadata.
This package uses the legacy Zenodo API and is not compatible with other InvenioRDM instances. For RO-Crate uploads using the InvenioRDM API, use the rocrate-inveniordm package instead.
Setup
Install the package
Install from PyPI using pip or your preferred package manager:
pip install rocrate-zenodo
Set up a Zenodo personal access token
Create a file called ~/.config/zenodo.ini on your computer with the following contents:
# if using the Zenodo sandbox
[zenodo:sandbox]
sandbox_api_token =
# if using the real Zenodo
[zenodo]
api_token =
Now create a Zenodo access token:
- Register for a Zenodo account if you don’t already have one.
- Go to your profile and select Applications.
- You should see a section called "Personal access tokens." Click the "New token" button.
- Give the token a name that reminds you of what you're using it for (e.g. RO-Crate uploader token)
- Select the scopes
deposit:writeanddeposit:actions. - Click "Create."
- Copy the access token into your
~/.config/zenodo.inifile.
The resulting file should look like this:
# if using the Zenodo sandbox
[zenodo:sandbox]
sandbox_api_token = your-sandbox-token-here
# if using the real Zenodo
[zenodo]
api_token = your-token-here
The rocrate-zenodo package will read this token whenever it connects to Zenodo in order to perform actions under your account. It's recommended to use the Zenodo sandbox until you're confident using the package.
Usage
To upload a crate to Zenodo sandbox:
rocrate_zenodo -s demo/demo_crate
Replace demo/demo_crate with the path to the RO-Crate directory you want to upload. The -s flag sets the destination to the Zenodo sandbox; you can omit -s to upload to real Zenodo.
Once complete, you should see the draft record in your Zenodo dashboard.
For further help and options, run:
rocrate_zenodo --help
Tips
- Set
givenNameandfamilyNameon authors of the RO-Crate. This ensures that author names are formatted correctly in Zenodo. - Use the SPDX URI for the top-level license, e.g.
https://spdx.org/licenses/CC-BY-NC-SA-4.0.html. Other URIs for licenses are not currently well supported. - Check your upload carefully in the Zenodo web interface before publishing. Not all metadata will be carried across from the RO-Crate, and some may be transferred incorrectly. Please raise an issue if you notice a discrepancy.
For Developers
See the Developer Guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rocrate_zenodo-0.1.1.tar.gz.
File metadata
- Download URL: rocrate_zenodo-0.1.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1fd10c6855bcc5148028e4e4fa77fe74c54933150663aa7a933551eb76fafb5
|
|
| MD5 |
dec747e9291c8d02562f42303fd8ada6
|
|
| BLAKE2b-256 |
50e17ef097dec7025e7dd139c98175be02c29802b485643a7919a36821aaf2f1
|
File details
Details for the file rocrate_zenodo-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rocrate_zenodo-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f57d5c8982aa6583486e2020c0e4df84fe1ae63192d023c5b192adae9a3e94
|
|
| MD5 |
c1be46f672124fc0b3cf6462771f1900
|
|
| BLAKE2b-256 |
9cc34303976013c4d080262bec837d12789e3fea883b95cb39ff98844c6485e7
|