mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-04-07 10:22:21 +00:00
fix(docs): fix tasks.py
This commit is contained in:
parent
fe6a1ab79b
commit
7d2647b656
1 changed files with 3 additions and 7 deletions
10
tasks.py
10
tasks.py
|
|
@ -1,7 +1,9 @@
|
|||
from invoke import task
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import webbrowser
|
||||
|
||||
|
||||
@task
|
||||
|
|
@ -154,17 +156,11 @@ def format_check(c):
|
|||
@task(help={"o": "Open documentation in the default browser after generation."})
|
||||
def docs(c, o=False):
|
||||
"""Generate Doxygen documentation."""
|
||||
task_begin("docs", "Docs")
|
||||
proc = subprocess.run("doxygen Doxyfile", shell=True)
|
||||
if proc.returncode == 0:
|
||||
task_end("docs", "done", "Docs generated")
|
||||
path = "docs/doxygen/html/index.html"
|
||||
console.print(
|
||||
f"\n[bold green]✓ Documentation generated in {path}[/bold green]"
|
||||
)
|
||||
print(f"\n✓ Documentation generated in {path}")
|
||||
if o:
|
||||
import webbrowser
|
||||
webbrowser.open(f"file://{os.path.abspath(path)}")
|
||||
return
|
||||
task_end("docs", "failed", "Doxygen failed")
|
||||
raise Exit(code=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue