feat: add notif-vault desktop notification archive with webhook fanout

This commit is contained in:
dualfroz committed 2026-07-29 15:26:23 +02:00
commit 050d43c2b9
8 files changed
+386

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import json
import os
from pathlib import Path
configDir = Path.home() / ".config" / "notif-vault"
configPath = configDir / "config.json"
defaultConfigPath = Path(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) / "config.default.json"
def loadConfig():
if configPath.exists():
with open(configPath) as f:
return json.load(f)
with open(defaultConfigPath) as f:
return json.load(f)
def ensureUserConfig():
if configPath.exists():
return
configDir.mkdir(parents=True, exist_ok=True)
with open(defaultConfigPath) as f:
default = f.read()
with open(configPath, "w") as f:
f.write(default)