source: gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/oalist-resoure-ids.py@ 37124

Last change on this file since 37124 was 37079, checked in by davidb, 16 months ago

Some scripts to help build out submitting OpenAnnotation List JSON files to the SimpleAnnotationServer/Store servlet

  • Property svn:executable set to *
File size: 464 bytes
Line 
1#!/usr/bin/env python3
2
3import sys
4import json
5
6
7argc = len(sys.argv)
8progname = sys.argv[0]
9
10ids = []
11
12for i in range(1, argc):
13 json_ifilename = sys.argv[i]
14
15 with open(json_ifilename, encoding='utf-8') as fh:
16 oalist = json.load(fh)
17
18 resources = oalist['resources']
19
20 for resource in resources:
21 ids.append(resource['@id'])
22
23
24
25for id in ids:
26 print(id)
27
28
29
30
31
Note: See TracBrowser for help on using the repository browser.