-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmake_index.bash
executable file
·69 lines (55 loc) · 1.12 KB
/
make_index.bash
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
SHAPESTXT=`ls ./build/toc/shapes*.txt`
TYPES=`cat $SHAPESTXT | sort | uniq | sed 's/_gegeneraliseerd//'`
function create_url(){
#echo "${1}"
for shape in $1
do
url=${shape/build/.}
year=${shape%.*}
year=${year##*_}
echo -n " [$year]($url)"
done
echo ""
}
# kopieer README
head -n 34 README.md
for type in $TYPES
do
echo ""
echo "# $type"
echo ""
SHAPES=$(ls -A build/wgs84/*.geojson | grep "/${type}_[12]" -)
if [ "$SHAPES" == "" ]; then
continue
fi
echo ""
echo "### wgs84 (EPSG:4326)"
echo ""
echo ""
echo -n " - geojson: "
create_url "$SHAPES"
echo ""
SHAPES=$(ls build/wgs84/*.topojson | grep $type -)
echo ""
echo -n " - topojson: "
create_url "$SHAPES"
echo ""
echo ""
echo "### rijksdriehoeksstelsel (EPSG:28992)"
echo ""
SHAPES=$(ls -A build/rd/*.geojson | grep "/$type" -)
if [ "$SHAPES" == "" ]; then
continue
fi
echo ""
echo -n " - geojson: "
create_url "$SHAPES"
echo ""
SHAPES=$(ls build/rd/*.topojson | grep $type -)
echo ""
echo -n " - topojson: "
create_url "$SHAPES"
echo ""
done
echo ""