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 , 16 months ago | |
---|---|
|
|
File size: 464 bytes |
Line | |
---|---|
1 | #!/usr/bin/env python3 |
2 | |
3 | import sys |
4 | import json |
5 | |
6 | |
7 | argc = len(sys.argv) |
8 | progname = sys.argv[0] |
9 | |
10 | ids = [] |
11 | |
12 | for 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 | |
25 | for id in ids: |
26 | print(id) |
27 | |
28 | |
29 | |
30 | |
31 |
Note:
See TracBrowser
for help on using the repository browser.