Skip to content

Commit ea34c3d

Browse files
committed
Changes to docs
1 parent 9374594 commit ea34c3d

File tree

4 files changed

+22
-36
lines changed

4 files changed

+22
-36
lines changed

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ WARN_LOGFILE =
829829
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
830830
# Note: If this tag is empty the current directory is searched.
831831

832-
INPUT = ../src/ifcgeom ../src/serializers
832+
INPUT = ../src/ifcgeom ../src/serializers ../src/ifcgeom_schema_agnostic ../src/ifcparse
833833

834834
# This tag can be used to specify the character encoding of the source files
835835
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# These arguments are required
2323
"containmentFolder": "./rst_files",
2424
"rootFileName": "library_root.rst",
25-
"rootFileTitle": "IfcOpenShell",
25+
"rootFileTitle": "IfcOpenShell C++",
2626
"doxygenStripFromPath": "..",
2727
# Suggested optional arguments
2828
"createTreeView": True,

docs/contents.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
IfcOpenShell
2+
============
3+
4+
.. toctree::
5+
:maxdepth: 3
6+
7+
rst_files/library_root
8+
9+
10+
* `ifcopenshell-python documentation <python/html/index.html>`_

docs/generate_docs.py

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,28 @@
11
# This program requires doxygen, sphinx, breathe and exhale.
22

33
import os
4-
import os.path
4+
import shutil
55
import subprocess
66

77
from sys import platform
88

9-
10-
def copy_content(content, container):
11-
with open(content) as f:
12-
with open(container, "w") as f1:
13-
for line in f:
14-
f1.write(line)
15-
16-
179
conf_path = "./conf.py"
1810
index_path = "./index.rst"
1911

20-
2112
if not os.path.isdir("./output/doxygen/xml"):
2213
os.makedirs("output/doxygen/xml")
2314

24-
if os.path.isfile(conf_path) and not os.path.isfile(index_path):
25-
os.remove(conf_path)
26-
if os.path.isfile(index_path) and not os.path.isfile(conf_path):
27-
os.remove(index_path)
28-
29-
if not (os.path.isfile(conf_path) and os.path.isfile(index_path)):
30-
subprocess.run(["sphinx-quickstart", "-q", "-p", "IfcOpenShell"])
31-
32-
conf_copy = ["./conf_to_copy.py", "./conf.py"]
33-
index_copy = ["./index_to_copy.rst", "./index.rst"]
34-
35-
copy_content(conf_copy[0], conf_copy[1])
36-
copy_content(index_copy[0], index_copy[1])
15+
subprocess.check_call(["sphinx-build", "-b", "html", ".", "output"])
3716

3817
if platform == "linux" or platform == "linux2":
39-
subprocess.run(["make", "html"])
40-
if not os.path.isdir("/output/_build"):
41-
subprocess.run(["cd","../src/ifcblenderexport/docs"])
42-
subprocess.run(["make", "html"])
43-
subprocess.run(["cd", "../../../docs"])
44-
45-
subprocess.run(["mv" "../src/ifcblenderexport/docs/_build", "./output"])
18+
if os.path.isdir("output/python"):
19+
shutil.rmtree("output/python")
4620

21+
if not os.path.exists(os.path.join("../src/ifcblenderexport/docs", "contents.rst")):
22+
subprocess.check_call(["ln", "index.rst", "contents.rst"], cwd="../src/ifcblenderexport/docs")
23+
subprocess.check_call(["make", "html"], cwd="../src/ifcblenderexport/docs")
24+
shutil.move("../src/ifcblenderexport/docs/_build", "./output")
25+
os.rename("./output/_build", "./output/python")
4726

4827
elif platform == "win32" or platform == "win64":
49-
subprocess.run(["make.bat", "html"])
50-
51-
52-
28+
subprocess.check_call(["make.bat", "html"])

0 commit comments

Comments
 (0)