Skip to content

Commit

Permalink
Change version IRI style
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostrzyciel committed Oct 29, 2023
1 parent aec6253 commit 4bb22b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tasks/doc_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
('jsonld', 'JSON-LD'),
('rdf', 'RDF/XML'),
]
BASE_LINK = 'https://w3id.org/stax/ontology'
BASE_LINK = 'https://w3id.org/stax'


def main():
Expand Down Expand Up @@ -41,7 +41,7 @@ def main():
with open(Path(__file__).parent / 'res' / 'pylode.css', 'r') as f:
css = f.read()
html = re.sub(r'<style>.*</style>', f'<style>{css}</style>', html, flags=re.DOTALL)
img = f'<img src="https://rdf-stax.github.io/{version_tag}/assets/ontology.png" alt="Ontology diagram" >'
img = f'<img src="/{version_tag}/assets/ontology.png" alt="Ontology diagram" >'
html = re.sub(r'<div.*?Pictures.*?</div>', img, html)
# Save
with open(output_file, 'w') as f:
Expand All @@ -52,7 +52,7 @@ def main():
f.write('!!! info\n\n')
f.write(' Download the ontology in RDF: ')
for (ext, fmt) in FORMATS:
f.write(f'**[{fmt}]({BASE_LINK}/{version_tag}.{ext})**')
f.write(f'**[{fmt}]({BASE_LINK}/{version_tag}/ontology.{ext})**')
if ext != 'rdf':
f.write(', ')
f.write('.\n')
Expand Down
2 changes: 1 addition & 1 deletion tasks/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def main():

print('Adding version...')
g.add((URIRef(STAX_MAIN), OWL.versionInfo, Literal(version)))
g.add((URIRef(STAX_MAIN), OWL.versionIRI, URIRef(f'{STAX_MAIN}/{version}')))
g.add((URIRef(STAX_MAIN), OWL.versionIRI, URIRef(STAX_MAIN.replace('ontology', version + '/ontology'))))
now_iso = datetime.now(timezone.utc).isoformat()[:19]
g.add((URIRef(STAX_MAIN), DCTERMS.issued, Literal(now_iso, datatype=XSD.dateTime)))
g.namespace_manager.bind('stax_ont', None, replace=True)
Expand Down

0 comments on commit 4bb22b8

Please sign in to comment.