Add Makefile for running it via KorAP-Docker on worker-07

Change-Id: I435db522eaf0be9bfea0b18c62021aa2225feb9f
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1b96617
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+.DELETE_ON_ERROR:
+
+all: json
+
+./output/corpus.p5.xml: nor2tei.py Makefile
+	mkdir -p output
+	python nor2tei.py `find /export/coin/ICC/NO/Originaldaten -name "*.xml"`
+
+icc-nor.p5.xml: ./output/corpus.p5.xml Makefile
+	perl -C255 -pe 's/([^>])\n/$1 /g; s/^\s*([^<])/$1/; s/\&gt /\&gt; /g;' $< | xmllint - > $@
+
+icc-nor.zip: icc-nor.p5.xml
+	pv $< | tei2korapxml -s -tk - > $@
+
+icc-nor.ud.zip: icc-nor.zip
+	korapxml2conllu $< | pv | /usr/local/kl/bin/udpipe2 -r -m norwegian-bokmaal-ud-2.10-220711 | conllu2korapxml > $@
+
+
+icc-nor.krill.tar: icc-nor.zip icc-nor.ud.zip
+	korapxml2krill archive -w -cfg /vol/corpora/ICC/icc-nor.cfg -i icc-nor.zip -i icc-nor.ud.zip -o icc-nor.krill
+
+json: icc-nor.krill.tar
+	rm -rf json
+	mkdir -p json
+	tar -C json -xf icc-nor.krill.tar
+	rsync -avz --delete json korap@korap-worker-07:/opt/korap/icc/nor/KorAP-Docker/
+	ssh korap@korap-worker-07 cd /opt/korap/icc/nor/KorAP-Docker && rm -rf index && mkdir -p index && docker run  -u root --rm -v /opt/korap/icc/nor/KorAP-Docker:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/