-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPublishing.py
More file actions
41 lines (35 loc) · 1.52 KB
/
Publishing.py
File metadata and controls
41 lines (35 loc) · 1.52 KB
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
from pylode import OntDoc, MakeDocco, APP_DIR
#from pathlib import Path
import os
from os.path import join, dirname, abspath
# initialise
#od = OntDoc(ontology="C:/Users/verwalter/Documents/GitHub/OntologyForConstructionQualityAssurance/08_Puclication/OCQA03.ttl")
#od = OntDoc(Path(__file__).parent / "OBPA.ttl")
#Version 3.0.4
#input_rdf = Path(__file__).parent / "OBPA.ttl"
#output_html = Path(__file__).parent / "OBPA.html"
#print(input_rdf)
#od = OntDoc(ontology=input_rdf)
#html = od.make_html(include_css=True, destination=output_html)
#Version 2.8.5
#input_rdf = Path(__file__).parent / "OBPA.ttl"
#output_html = Path(__file__).parent / "OBPA.html"
#print(input_rdf)
#print(output_html)
TESTS_DIR = dirname(abspath(__file__))
ONTOLOGY_DIR = join(TESTS_DIR, "Modules", "Adaptive")
os.chdir(ONTOLOGY_DIR)
print(ONTOLOGY_DIR)
print(join(ONTOLOGY_DIR, "ocqa-adaptive.ttl"))
#od=OntDoc(default_language="en",source_info=input_rdf, g=input_rdf)
h = MakeDocco(input_data_file=join(ONTOLOGY_DIR, "ocqa-adaptive.ttl"))
# generate the HTML doc
h.document(destination=join(ONTOLOGY_DIR, "newindex.html"))
#html = OntDoc(source_info=input_rdf, include_css=True, outputformat="html", default_language="en",get_curies_online=False,use_curies_stored=True, g=any, destination)
#html = OntDoc(input_rdf).make_html(destination="OCQA_03some-resulting-html-file.html")
# produce HTML
#html = od.make_html()
# or save HTML to a file
#od.make_html(destination="OCQA_03some-resulting-html-file.html")
#html = OntDoc(ontology=input_rdf)
#html._make_restriction_html