Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Oct 25, 2024
1 parent f9c1457 commit b517875
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ jobs:
mkdir docs
mv *.ttl docs/
cd docs
pylode -o application/index.html -i application/application.ttl
pylode -o application/index.html -i application.ttl
mv application.ttl application/
pylode -o index.html -i index.ttl
pylode -o co/index.html -i co/co.ttl
pylode -o cs/index.html -i cs/cs.ttl
pylode -o datum/index.html -i datum/datum.ttl
pylode -o planet/index.html -i planet/planet.ttl
pylode -o projection/index.html -i projection/projection.ttl
pylode -o co/index.html -i co.ttl
mv co.ttl co/
pylode -o cs/index.html -i cs.ttl
mv cs.ttl cs/
pylode -o datum/index.html -i datum.ttl
mv datum.ttl datum/
pylode -o planet/index.html -i planet.ttl
mv planet.ttl planet/
pylode -o projection/index.html -i projection.ttl
mv projection.ttl projection/
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
Expand Down
10 changes: 4 additions & 6 deletions scripts/srsbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.label,Literal(row["Label"],lang="en")))
if "Definition" in row and row["Definition"]!="":
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),SKOS.definition,Literal(row["Definition"],lang="en")))
if "SubClass" in row and row["SuperClass"]!="":
if "SuperClass" in row and row["SuperClass"]!="":
gcore.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace("geosrs:",geocrsNS))))
else:
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDF.type,OWL.Class))
if "Label" in row and row["Label"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.label,Literal(row["Label"],lang="en")))
if "Definition" in row and row["Definition"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),SKOS.definition,Literal(row["Definition"],lang="en")))
if "SubClass" in row and row["SuperClass"]!="":
if "SuperClass" in row and row["SuperClass"]!="":
g.add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.subClassOf,URIRef(row["SuperClass"].replace("geosrs:",geocrsNS))))
else:
continue
Expand Down Expand Up @@ -120,15 +120,13 @@
exont[row["Core Property?"].lower()].add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.range,URIRef(row["Range"].replace("geosrs:",geocrsNS))))
if "Domain" in row and row["Domain"]!="":
exont[row["Core Property?"].lower()].add((URIRef(row["Concept"].replace(curprefix+":",curns)),RDFS.domain,URIRef(row["Domain"].replace("geosrs:",geocrsNS))))
os.mkdir(filename.replace(".csv",""))
g.serialize(destination=filename.replace(".csv","")+"/"+filename.replace(".csv","")+".ttl")
g.serialize(destination=filename.replace(".csv","")+".ttl")
else:
continue

print(len(g))
for item in exont:
os.mkdir(item)
exont[item].serialize(destination=item+"/"+item+".ttl")
exont[item].serialize(destination=item+".ttl")
gcore.serialize(destination="index.ttl")

g=Graph()
Expand Down

0 comments on commit b517875

Please sign in to comment.