Make IfcConvert downloads also come consistently from github releases

This commit is contained in:
Dion Moult
2024-07-26 20:01:58 +10:00
parent 228bbc30ad
commit 6f70196a6c
3 changed files with 14 additions and 14 deletions
+9 -2
View File
@@ -48,14 +48,21 @@ with open(os.path.join(cwd, "..", "..", "..", "VERSION"), "r") as f:
from docutils import nodes
def versioned_link_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
def ios_python_url(name, rawtext, text, lineno, inliner, options={}, content=[]):
url = f"https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcopenshell-python-{release}/ifcopenshell-python-{release}-{text}.zip"
node = nodes.reference(rawtext, text, refuri=url, **options)
return [node], []
def ifcconvert_url(name, rawtext, text, lineno, inliner, options={}, content=[]):
url = f"https://github.com/IfcOpenShell/IfcOpenShell/releases/download/ifcconvert-{release}/ifcconvert-{release}-{text}.zip"
node = nodes.reference(rawtext, text, refuri=url, **options)
return [node], []
def setup(app):
app.add_role("ios_python_url", versioned_link_role)
app.add_role("ios_python_url", ios_python_url)
app.add_role("ifcconvert_url", ifcconvert_url)
# -- General configuration ---------------------------------------------------