Skip to content

Commit 69e2a30

Browse files
committed
Add new identifier and accept script example
1 parent 603b66b commit 69e2a30

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

accept.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import argparse, os
2+
from caltechdata_api import caltechdata_accept
3+
4+
parser = argparse.ArgumentParser(
5+
description="Accept records to a community in the CaltechDATA repository"
6+
)
7+
parser.add_argument("ids", nargs="*", help="CaltechDATA IDs")
8+
args = parser.parse_args()
9+
10+
# Get access token set as environment variable with source token.bash
11+
token = os.environ["RDMTOK"]
12+
13+
production = True
14+
15+
caltechdata_accept(
16+
args.ids,
17+
token,
18+
production,
19+
)
20+
print('Completed')

caltechdata_api/vocabularies/identifier_types.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@
9898
datacite: cdid
9999
title:
100100
en: CALTECHDATA_ID
101+
- id: tiltid
102+
props:
103+
datacite: tiltid
104+
title:
105+
en: TILT_SERIES_ID

0 commit comments

Comments
 (0)