Commit 70ba2233 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Install: get win32 exe from github API

parent be39bc57
......@@ -73,7 +73,8 @@ In webserver mode, you must install `mysqlclient` python module (will not be ins
We provide an installer to install D-Genies. You can download it [here](
We provide an installer to install D-Genies. You can download it
[here]({%if win32 %}{{win32}}{% else %}#{% endif %}).
All requirements are present inside the package, so you don't have to do anything else.
......@@ -386,17 +386,22 @@ def documentation_dotplot():
@app.route("/install", methods=['GET'])
def install():
latest = ""
win32 = ""
call = requests.get("")
if call.ok:
latest = json.loads(call.content.decode("utf-8"))
if "tag_name" in latest:
latest = latest["tag_name"][1:]
release = json.loads(call.content.decode("utf-8"))
if "tag_name" in release:
latest = release["tag_name"][1:]
for asset in release["assets"]:
if asset["name"].endswith(".exe"):
win32 = asset["browser_download_url"]
with open(os.path.join(app_folder, "md", ""), "r", encoding='utf-8') as install_instr:
content =
env = Environment()
template = env.from_string(content)
content = template.render(version=latest)
content = template.render(version=latest, win32=win32)
md = Markdown(extensions=[TocExtension(baselevel=1)])
content = Markup(md.convert(content))
toc = Markup(md.toc)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment