forked from cernopendata/data-curation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·22 lines (19 loc) · 713 Bytes
/
run.sh
File metadata and controls
executable file
·22 lines (19 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Pre-requisites:
#
# $ cd ~/private/src/opendata.cern.ch && git checkout qa # COD2
# $ ./scripts/populate-fft-file-cache.sh # COD2
#
# $ cd ~/private/project/opendata/cod2-to-cod3-data-conversion
# $ python ./code/fft_file_cache_info_create.py > ./code/fft_file_cache_info.py
# Usage:
#
# $ cd ~/private/project/opendata/cod3-to-cod3-data-conversion
# $ docker run -i -t --rm -v `pwd`:/data-conversion tiborsimko/invenio:1.2.2 /data-conversion/run.sh
# $ jsonlint -q outputs/*.json
DIR=/data-conversion
for file in $(ls -1 ${DIR}/inputs/*.xml); do
filebase=$(basename ${file} .xml)
python ${DIR}/code/convert_records.py ${DIR}/inputs/${filebase}.xml > ${DIR}/outputs/${filebase}.json
done