feat: build update-swarm jobs.json from vault notes
This commit is contained in:
1 parent
299b01c4fd
commit
d91b0bc13d
7 files changed
+109
No files matched your search
@@ -0,0 +1,12 @@
|
||||
from __future__ import annotations
|
||||
import json, os
|
||||
|
||||
def read_json(path: str):
|
||||
with open(path, encoding="utf-8") as f:
|
||||
return json.load(f)
|
||||
|
||||
def write_json(path: str, obj) -> None:
|
||||
os.makedirs(os.path.dirname(path) or ".", exist_ok=True)
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
json.dump(obj, f, indent=2, ensure_ascii=False)
|
||||
f.write("\n")
|
||||
Reference in new issue
Block a user