feat: add homelab deployment configs, documentation, and automation scripts
This commit is contained in:
27
scripts/capture_screenshot.py
Normal file
27
scripts/capture_screenshot.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
edge_path = r"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
|
||||
out_png = os.path.abspath("docs/snarfnet_homelab_topology.png")
|
||||
html_url = "file:///" + os.path.abspath("docs/snarfnet_homelab_topology.html").replace("\\", "/")
|
||||
|
||||
cmd = [
|
||||
edge_path,
|
||||
"--headless",
|
||||
"--disable-gpu",
|
||||
"--no-sandbox",
|
||||
"--hide-scrollbars",
|
||||
"--window-size=1920,2400",
|
||||
f"--screenshot={out_png}",
|
||||
html_url
|
||||
]
|
||||
|
||||
print("Running cmd:", " ".join(cmd))
|
||||
res = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
|
||||
print("Return code:", res.returncode)
|
||||
print("Stdout:", res.stdout)
|
||||
print("Stderr:", res.stderr)
|
||||
print("File exists?", os.path.exists(out_png))
|
||||
if os.path.exists(out_png):
|
||||
print("File size:", os.path.getsize(out_png))
|
||||
|
||||
Reference in New Issue
Block a user