2026-04-01 10:24:47 -03:00
|
|
|
import json
|
2024-07-26 17:47:59 -03:00
|
|
|
import os
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
def load_config():
|
|
|
|
|
settings = {"gradient": "", "design": "block", "colorA": "green", "colorB": "yellow"}
|
|
|
|
|
settingsClock = {"gradient": "", "colorA": "green", "colorB": "yellow"}
|
|
|
|
|
path = {"ip_port": "", "rpcuser": "", "rpcpass": "", "bitcoincli": ""}
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
if os.path.isfile('config/bclock.conf'):
|
2026-04-01 10:24:47 -03:00
|
|
|
with open("config/bclock.conf", "r") as f:
|
|
|
|
|
pathv = json.load(f)
|
2024-07-26 17:47:59 -03:00
|
|
|
path = pathv
|
|
|
|
|
if os.path.isfile('config/blndconnect.conf'):
|
2026-04-01 10:24:47 -03:00
|
|
|
with open("config/blndconnect.conf", "r") as f:
|
|
|
|
|
lndconnectData = json.load(f)
|
2024-07-26 17:47:59 -03:00
|
|
|
lndconnectload = lndconnectData
|
|
|
|
|
except Exception as e:
|
|
|
|
|
print(f"An error occurred: {e}")
|
|
|
|
|
sys.exit(101)
|
|
|
|
|
|
|
|
|
|
return path, settings, settingsClock
|