Files
PoliciesGenerator/utils.py
Julian Freeman 8c02532e28 windows 版本
2024-06-27 23:10:46 -04:00

11 lines
264 B
Python

# coding: utf8
import json
from pathlib import Path
def read_template(browser: str) -> dict:
filepath = Path(__file__).parent / "templates" / f"{browser}.json"
if not filepath.exists():
return {}
return json.loads(filepath.read_text("utf8"))