-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfetch_data.sh
executable file
·34 lines (24 loc) · 1.03 KB
/
fetch_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# bin/bash
rm -rf data
wget https://github.com/arthur-schnitzler/schnitzler-bahr-data/archive/refs/heads/main.zip
unzip main
mv ./schnitzler-bahr-data-main/data .
rm -rf ./data/xslts
rm main.zip
rm -rf ./schnitzler-bahr-data-main
echo "delete schema reference"
find ./data/editions/ -type f -name "*.xml" -print0 | xargs -0 sed -i -e 's@<?xml-model href="../../schema/HBAS_diaries.odd.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>@@g'
echo "fixing entitiy ids"
find ./data/indices/ -type f -name "*.xml" -print0 | xargs -0 sed -i -e 's@<person xml:id="person__@<person xml:id="pmb@g'
echo "create calendar data"
python make_calendar_data.py
echo "add mentions to register-files"
python add_mentions.py
# get schnitzler-chronik-data
# Download XML files from GitHub repository
wget https://github.com/arthur-schnitzler/schnitzler-chronik-data/archive/refs/heads/main.zip
rm -rf chronik-data
unzip main.zip
mv schnitzler-chronik-data-main/editions/data chronik-data/
rm -rf schnitzler-chronik-data-main
rm main.zip