mirror of
https://github.com/jopohl/urh.git
synced 2026-03-07 16:56:48 +01:00
29 lines
605 B
Python
29 lines
605 B
Python
OUTPUT = "html"
|
|
# OUTPUT = "pdf"
|
|
|
|
|
|
|
|
|
|
|
|
from subprocess import call
|
|
import sys, os
|
|
|
|
cur_dir = os.path.abspath(__file__)
|
|
src_dir = os.path.realpath(os.path.join(cur_dir, "..", "..", "src"))
|
|
sys.path.append(src_dir)
|
|
|
|
os.chdir("./sphinx-gen")
|
|
|
|
if OUTPUT == "html":
|
|
call(["make", "html"])
|
|
os.chdir("./_build/html")
|
|
print(os.listdir())
|
|
call(["firefox", "index.html"])
|
|
elif OUTPUT == "pdf":
|
|
call(["make", "latexpdf"])
|
|
os.chdir("./_build/latex")
|
|
for file in os.listdir():
|
|
if not file.endswith("pdf"):
|
|
os.remove(file)
|
|
call(["okular", "UniversalRadioHacker.pdf"])
|