mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-04-09 03:11:29 +00:00
feat(docs): add Doxygen configuration and update .gitignore for documentation files
This commit is contained in:
parent
a2d51540b7
commit
fe6a1ab79b
4 changed files with 85 additions and 0 deletions
19
tasks.py
19
tasks.py
|
|
@ -149,3 +149,22 @@ def format_check(c):
|
|||
sys.exit(1)
|
||||
|
||||
print("\n✅ All files are correctly formatted!")
|
||||
|
||||
|
||||
@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]"
|
||||
)
|
||||
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