Skip to content

Commit 46f627e

Browse files
committed
Better unembargo behavior
1 parent c2bd398 commit 46f627e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

caltechdata_api/caltechdata_edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def caltechdata_unembargo(token, ids, production=False):
3636

3737
metadata = {
3838
"id": idv,
39-
"embargo_date": "2000-01-01",
39+
"embargo_date": "DELETE",
4040
"files": {"update": update},
4141
}
4242

unembargo.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import argparse, os, json
2+
from caltechdata_api import caltechdata_unembargo
3+
4+
parser = argparse.ArgumentParser(description=\
5+
"Write files and a DataCite 4 standard json record\
6+
to CaltechDATA repository")
7+
parser.add_argument('-ids', nargs='*', help='CaltechDATA IDs')
8+
args = parser.parse_args()
9+
10+
#Get access token from TIND set as environment variable with source token.bash
11+
token = os.environ['TINDTOK']
12+
13+
production = False
14+
15+
response = caltechdata_unembargo(token, args.ids, production)
16+
print(response)

0 commit comments

Comments
 (0)