-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.sh
executable file
·28 lines (20 loc) · 1.1 KB
/
make.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
#!/usr/bin/env bash
wget -O sparql-results/superpatterns.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-superpatterns.csv
wget -O sparql-results/reviews.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-reviews.csv
wget -O sparql-results/classdefs.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-classdefs.csv
wget -O sparql-results/updates.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-updates.csv
wget -O sparql-results/review-to-superpattern.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-review-to-superpattern.csv
wget -O sparql-results/superpattern-to-classdef.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-superpattern-to-classdef.csv
wget -O sparql-results/update-to-superpattern.csv http://grlc.io/api-git/peta-pico/fpsi-admin/get-update-to-superpattern.csv
rm np-graph.csv
for file in sparql-results/*.csv; do
cat $file | sed 1d >> np-graph.csv
done
cat np-graph.head.dot > np-graph.dot
cat np-graph.csv \
| sed -r 's/","(.*)","/" \1 "/g' \
| sed 's/""/"/g' \
| sed 's/ "$//g' \
>> np-graph.dot
cat np-graph.tail.dot >> np-graph.dot
dot -Tsvg np-graph.dot > np-graph.svg