facile_rs.create_zenodo¶
Create an archive in Zenodo.
Description¶
This script creates an archive in Zenodo and uploads the assets provided as positional arguments. The metadata is created similar to create_datacite.
If the Zenodo ID is already present in the CodeMeta file, the existing Zenodo archive is updated instead.
Usage¶
usage: create_zenodo.py [-h] --codemeta-location CODEMETA_LOCATION
[--creators-locations CREATORS_LOCATIONS]
[--contributors-locations CONTRIBUTORS_LOCATIONS]
[--no-sort-authors] [--zenodo-path ZENODO_PATH]
--zenodo-url ZENODO_URL --zenodo-token ZENODO_TOKEN
[--smtp-server SMTP_SERVER]
[--notification-email NOTIFICATION_EMAIL]
[--assets-token ASSETS_TOKEN]
[--assets-token-name ASSETS_TOKEN_NAME] [--dry]
[--overwrite] [--log-level LOG_LEVEL]
[--log-file LOG_FILE]
[ASSETS ...]
Positional Arguments¶
- ASSETS
Assets to be added to the repository.
Default:
[]
Named Arguments¶
- --codemeta-location
Location of the main codemeta.json JSON file
- --creators-locations, --creators-location
Locations of codemeta JSON files for additional creators
Default:
[]- --contributors-locations, --contributors-location
Locations of codemeta JSON files for additional contributors
Default:
[]- --no-sort-authors
Do not sort authors alphabetically, keep order in codemeta.json file
Default:
True- --zenodo-path
Path to the local directory, where the assets are collected before upload. Optional: if not provided, a temporary directory is used.
- --zenodo-url
URL of the Zenodo service. Test environment available at https://sandbox.zenodo.org
- --zenodo-token
Zenodo personal token.
- --smtp-server
SMTP server used to inform about new release. No mail sent if empty.
- --notification-email
Recipient address to inform about new release. No mail sent if empty.
- --assets-token
Private token, to be used when fetching assets
- --assets-token-name
Name of the header field for the token [default: “PRIVATE-TOKEN”]
Default:
'PRIVATE-TOKEN'- --dry
Perform a dry run, do not upload anything.
Default:
False- --overwrite
Overwrite existing local assets.
Default:
False- --log-level
Log level (ERROR, WARN, INFO, or DEBUG)
Default:
'WARN'- --log-file
Path to the log file
Module Contents¶
Functions¶
API¶
- create_parser(add_help=True)¶
- main(args)¶
- main_deprecated()¶