manim/scripts/make_and_open_docs.py
Naveen M K dcb90a8656
Format Imports using Isort (#1178)
* Format imports using Isort.
Add a check for pull requests.

Signed-off-by: Naveen M K <naveen@syrusdark.website>

* CI: update check's name
2021-04-03 13:45:12 +05:30

13 lines
420 B
Python

import os
import sys
import webbrowser
from pathlib import Path
path_makefile = Path(__file__).parents[1] / "docs"
os.system(f"cd {path_makefile} && make html")
website = (path_makefile / "build" / "html" / "index.html").absolute().as_uri()
try: # Allows you to pass a custom browser if you want.
webbrowser.get(sys.argv[1]).open_new_tab(f"{website}")
except IndexError:
webbrowser.open_new_tab(f"{website}")