facile_rs.create_bagpack

Create a BagIt bag including a DataCite XML file.

Description

This script creates a BagIt bag using the bagit-python package, but also includes a DataCite XML file as recommended by the RDA Research Data Repository Interoperability WG. The assets to be included in the bag are given as positional arguments.

Usage

usage: create_bagpack.py [-h] [--bag-path BAG_PATH]
                         [--bag-info-locations BAG_INFO_LOCATIONS]
                         [--datacite-location DATACITE_LOCATION]
                         [--assets-token ASSETS_TOKEN]
                         [--assets-token-name ASSETS_TOKEN_NAME] [--overwrite]
                         [--log-level LOG_LEVEL] [--log-file LOG_FILE]
                         [ASSETS ...]

Positional Arguments

ASSETS

Assets to be added to the bag.

Default: []

Named Arguments

--bag-path

Path to the Bag directory

--bag-info-locations, --bag-info-location

Locations of the bag-info YAML/JSON files

Default: []

--datacite-location

Path to the DataCite XML file

--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'

--overwrite

Overwrite existing Bag directory

Default: False

--log-level

Log level (ERROR, WARN, INFO, or DEBUG)

Default: 'WARN'

--log-file

Path to the log file

Module Contents

Functions

create_parser

main

main_deprecated

API

create_parser(add_help=True)
main(args)
main_deprecated()