Skip to content

Commit d5485ff

Browse files
committed
Use github actions to generate style files from pieces
1 parent eac0f78 commit d5485ff

File tree

8 files changed

+1074
-0
lines changed

8 files changed

+1074
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Styles
2+
3+
on:
4+
push:
5+
paths:
6+
- Preamble_Global.ultra
7+
- Preamble_QLever.ultra
8+
- Preamble_US.ultra
9+
- Query_Global.ultra
10+
- Query_QLever.ultra
11+
- Query_US.ultra
12+
- Style.ultra
13+
14+
jobs:
15+
combine:
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
25+
- name: Generate styles files from components
26+
run: |
27+
cat Preamble_US.ultra Style.ultra Query_US.ultra > HSMascotMap.ultra
28+
cat Preamble_Global.ultra Style.ultra Query_Global.ultra > HSMascotMap_global.ultra
29+
cat Preamble_QLever.ultra Style.ultra Query_QLever.ultra > HSMascotMap_QLever.ultra
30+
git config user.name "github-actions[bot]"
31+
git config user.email "github-actions[bot]@users.noreply.github.com"
32+
git add HSMascotMap.ultra
33+
git add HSMascotMap_global.ultra
34+
git add HSMascotMap_QLever.ultra
35+
git commit -m "Update style files"
36+
git push

Preamble_Global.ultra

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
options:
3+
hash: m
4+
attributionControl:
5+
customAttribution: '<a href=".">Ultra</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap">Github</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap/blob/main/icon-info.md">Icons</a>'
6+
controls:
7+
- type: GeolocateControl
8+
options:
9+
positionOptions:
10+
enableHighAccuracy: true
11+
trackUserLocation: true

Preamble_QLever.ultra

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: MascotMap
3+
description: Map of school mascots powered by OSM.
4+
type: sparql
5+
server: https://qlever.cs.uni-freiburg.de/api/osm-planet
6+
options:
7+
hash: m
8+
zoom: -0.1
9+
center: [0, 30]
10+
attributionControl:
11+
customAttribution: '<a href=".">Ultra</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap">Github</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap/blob/main/icon-info.md">Icons</a>'
12+
controls:
13+
- type: GeolocateControl
14+
options:
15+
positionOptions:
16+
enableHighAccuracy: true
17+
trackUserLocation: true

Preamble_US.ultra

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
options:
3+
hash: m
4+
attributionControl:
5+
customAttribution: '<a href=".">Ultra</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap">Github</a> | <a href="https://github.com/watmildon/HighSchoolMascotMap/blob/main/icon-info.md">Icons</a>'
6+
bounds: [ -124.848974, 24.396308, -66.885444, 49.384358 ]
7+
controls:
8+
- type: GeolocateControl
9+
options:
10+
positionOptions:
11+
enableHighAccuracy: true
12+
trackUserLocation: true

Query_Global.ultra

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[out:json][timeout:800];
2+
// determine set of schools
3+
(
4+
nwr[mascot][amenity=school];
5+
);
6+
7+
out center;

Query_QLever.ultra

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
2+
PREFIX osmkey: <https://www.openstreetmap.org/wiki/Key:>
3+
SELECT * WHERE {
4+
?osm_id osmkey:amenity "school".
5+
?osm_id osmkey:mascot ?mascot.
6+
?osm_id geo:hasCentroid/geo:asWKT ?centroid .
7+
OPTIONAL {
8+
?osm_id osmkey:addr:city ?addr_city .
9+
}
10+
OPTIONAL {
11+
?osm_id osmkey:addr:housenumber ?addr_housenumber .
12+
}
13+
OPTIONAL {
14+
?osm_id osmkey:addr:postcode ?addr_postcode .
15+
}
16+
OPTIONAL {
17+
?osm_id osmkey:addr:state ?addr_state .
18+
}
19+
OPTIONAL {
20+
?osm_id osmkey:addr:street ?addr_street .
21+
}
22+
OPTIONAL {
23+
?osm_id osmkey:addr:unit ?addr_unit .
24+
}
25+
OPTIONAL {
26+
?osm_id osmkey:alt_name ?alt_name .
27+
}
28+
OPTIONAL {
29+
?osm_id osmkey:contact:phone ?contact_phone .
30+
}
31+
OPTIONAL {
32+
?osm_id osmkey:gnis:feature_id ?gnis_feature_id .
33+
}
34+
OPTIONAL {
35+
?osm_id osmkey:grades ?grades .
36+
}
37+
OPTIONAL {
38+
?osm_id osmkey:kindergarten ?kindergarten .
39+
}
40+
OPTIONAL {
41+
?osm_id osmkey:mascot:iconography ?mascot_iconography .
42+
}
43+
OPTIONAL {
44+
?osm_id osmkey:mascot:iconography:wikidata ?mascot_iconography_wikidata .
45+
}
46+
OPTIONAL {
47+
?osm_id osmkey:name ?name .
48+
}
49+
OPTIONAL {
50+
?osm_id osmkey:note:mascot ?note_mascot .
51+
}
52+
OPTIONAL {
53+
?osm_id osmkey:old_name ?old_name .
54+
}
55+
OPTIONAL {
56+
?osm_id osmkey:operator ?operator .
57+
}
58+
OPTIONAL {
59+
?osm_id osmkey:operator:type ?operator_type .
60+
}
61+
OPTIONAL {
62+
?osm_id osmkey:operator:wikidata ?operator_wikidata .
63+
}
64+
OPTIONAL {
65+
?osm_id osmkey:phone ?phone .
66+
}
67+
OPTIONAL {
68+
?osm_id osmkey:preschool ?preschool .
69+
}
70+
OPTIONAL {
71+
?osm_id osmkey:ref:nces ?ref_nces .
72+
}
73+
OPTIONAL {
74+
?osm_id osmkey:wikidata ?wikidata .
75+
}
76+
OPTIONAL {
77+
?osm_id osmkey:wikipedia ?wikipedia .
78+
}
79+
}

Query_US.ultra

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[out:json][timeout:800];
2+
rel(148838);map_to_area->.searchArea;
3+
// determine set of schools
4+
(
5+
nwr[mascot][amenity=school](area.searchArea);
6+
);
7+
8+
out center;

0 commit comments

Comments
 (0)