Skip to content

Commit

Permalink
Add new identifier and accept script example
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorrell committed Nov 23, 2022
1 parent 603b66b commit 69e2a30
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions accept.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import argparse, os
from caltechdata_api import caltechdata_accept

parser = argparse.ArgumentParser(
description="Accept records to a community in the CaltechDATA repository"
)
parser.add_argument("ids", nargs="*", help="CaltechDATA IDs")
args = parser.parse_args()

# Get access token set as environment variable with source token.bash
token = os.environ["RDMTOK"]

production = True

caltechdata_accept(
args.ids,
token,
production,
)
print('Completed')
5 changes: 5 additions & 0 deletions caltechdata_api/vocabularies/identifier_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,8 @@
datacite: cdid
title:
en: CALTECHDATA_ID
- id: tiltid
props:
datacite: tiltid
title:
en: TILT_SERIES_ID

0 comments on commit 69e2a30

Please sign in to comment.