mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-09-06 03:20:49 +02:00
feat: add OpenDocument PDF templates
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def open_path(path: Path) -> None:
|
||||
selected = path.resolve()
|
||||
if sys.platform == "win32":
|
||||
os.startfile(selected) # type: ignore[attr-defined]
|
||||
elif sys.platform == "darwin":
|
||||
subprocess.Popen(["open", str(selected)])
|
||||
else:
|
||||
subprocess.Popen(["xdg-open", str(selected)])
|
||||
Reference in New Issue
Block a user