# 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](https://github.com/ResearchObject/ro-crate-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:
```ini
# if using the Zenodo sandbox
[zenodo:sandbox]
sandbox_api_token =
# if using the real Zenodo
[zenodo]
api_token =
```
Now create a Zenodo access token:
1. Register for a Zenodo account if you don’t already have one.
1. Go to your profile and select Applications.
1. You should see a section called "Personal access tokens." Click the "New token" button.
1. Give the token a name that reminds you of what you're using it for (e.g. _RO-Crate uploader token_)
1. Select the scopes `deposit:write` and `deposit:actions`.
1. Click "Create."
1. Copy the access token into your `~/.config/zenodo.ini` file.
The resulting file should look like this:
```ini
# 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
1. Set `givenName` and `familyName` on authors of the RO-Crate. This ensures that author names are formatted correctly in Zenodo.
2. 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.
3. 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](https://github.com/ResearchObject/ro-crate-zenodo/issues/new) if you notice a discrepancy.
## For Developers
See the [Developer Guide](https://github.com/ResearchObject/ro-crate-zenodo/blob/main/docs/developer_guide.md).
Raw data
{
"_id": null,
"home_page": "https://www.researchobject.org/ro-crate/",
"name": "rocrate-zenodo",
"maintainer": "Eli Chadwick",
"docs_url": null,
"requires_python": "<4.0.0,>=3.8.1",
"maintainer_email": "eli.chadwick@manchester.ac.uk",
"keywords": "rocrate, RO-Crate",
"author": "Eli Chadwick",
"author_email": "eli.chadwick@manchester.ac.uk",
"download_url": "https://files.pythonhosted.org/packages/50/e1/7ef097dec7025e7dd139c98175be02c29802b485643a7919a36821aaf2f1/rocrate_zenodo-0.1.1.tar.gz",
"platform": null,
"description": "# ro-crate-zenodo\n\nUpload RO-Crates to Zenodo and automatically fill the Zenodo metadata.\n\nThis 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](https://github.com/ResearchObject/ro-crate-inveniordm) package instead.\n\n## Setup\n\n### Install the package\n\nInstall from PyPI using `pip` or your preferred package manager:\n```\npip install rocrate-zenodo\n```\n### Set up a Zenodo personal access token\n\nCreate a file called `~/.config/zenodo.ini` on your computer with the following contents:\n\n```ini\n# if using the Zenodo sandbox\n[zenodo:sandbox]\nsandbox_api_token = \n\n# if using the real Zenodo\n[zenodo]\napi_token = \n```\n\nNow create a Zenodo access token:\n\n1. Register for a Zenodo account if you don\u2019t already have one.\n1. Go to your profile and select Applications.\n1. You should see a section called \"Personal access tokens.\" Click the \"New token\" button.\n1. Give the token a name that reminds you of what you're using it for (e.g. _RO-Crate uploader token_)\n1. Select the scopes `deposit:write` and `deposit:actions`.\n1. Click \"Create.\"\n1. Copy the access token into your `~/.config/zenodo.ini` file.\n\nThe resulting file should look like this:\n\n```ini\n# if using the Zenodo sandbox\n[zenodo:sandbox]\nsandbox_api_token = your-sandbox-token-here\n\n# if using the real Zenodo\n[zenodo]\napi_token = your-token-here\n```\n\nThe `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.\n\n## Usage\n\nTo upload a crate to Zenodo sandbox:\n```\nrocrate_zenodo -s demo/demo_crate\n```\nReplace `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.\n\nOnce complete, you should see the draft record in your Zenodo dashboard.\n\nFor further help and options, run:\n```\nrocrate_zenodo --help\n```\n\n## Tips\n\n1. Set `givenName` and `familyName` on authors of the RO-Crate. This ensures that author names are formatted correctly in Zenodo.\n2. 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.\n3. 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](https://github.com/ResearchObject/ro-crate-zenodo/issues/new) if you notice a discrepancy.\n\n## For Developers\n\nSee the [Developer Guide](https://github.com/ResearchObject/ro-crate-zenodo/blob/main/docs/developer_guide.md).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Upload RO-Crates to Zenodo and automatically fill the Zenodo metadata",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://www.researchobject.org/ro-crate/",
"Issues": "https://github.com/ResearchObject/ro-crate-zenodo/issues",
"Repository": "https://github.com/ResearchObject/ro-crate-zenodo"
},
"split_keywords": [
"rocrate",
" ro-crate"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9cc34303976013c4d080262bec837d12789e3fea883b95cb39ff98844c6485e7",
"md5": "c1be46f672124fc0b3cf6462771f1900",
"sha256": "e1f57d5c8982aa6583486e2020c0e4df84fe1ae63192d023c5b192adae9a3e94"
},
"downloads": -1,
"filename": "rocrate_zenodo-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c1be46f672124fc0b3cf6462771f1900",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.8.1",
"size": 10873,
"upload_time": "2024-08-23T13:19:03",
"upload_time_iso_8601": "2024-08-23T13:19:03.845737Z",
"url": "https://files.pythonhosted.org/packages/9c/c3/4303976013c4d080262bec837d12789e3fea883b95cb39ff98844c6485e7/rocrate_zenodo-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "50e17ef097dec7025e7dd139c98175be02c29802b485643a7919a36821aaf2f1",
"md5": "dec747e9291c8d02562f42303fd8ada6",
"sha256": "d1fd10c6855bcc5148028e4e4fa77fe74c54933150663aa7a933551eb76fafb5"
},
"downloads": -1,
"filename": "rocrate_zenodo-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "dec747e9291c8d02562f42303fd8ada6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.8.1",
"size": 9472,
"upload_time": "2024-08-23T13:19:05",
"upload_time_iso_8601": "2024-08-23T13:19:05.314551Z",
"url": "https://files.pythonhosted.org/packages/50/e1/7ef097dec7025e7dd139c98175be02c29802b485643a7919a36821aaf2f1/rocrate_zenodo-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 13:19:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ResearchObject",
"github_project": "ro-crate-zenodo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rocrate-zenodo"
}