syncthing-monitor/syncthing_monitor/__main__.py
2021-01-28 15:33:21 +02:00

18 lines
433 B
Python

from syncthing_monitor.config_xml import parse_api_key, set_listen_ip_to_any
from syncthing_monitor.syncthing_rest import get_device_id
def loop(gui_port="8384", host="sync"):
api_key = parse_api_key()
print("Found API Key: {0}".format(api_key))
set_listen_ip_to_any()
device_id = get_device_id(host, gui_port, api_key)
print("Found Device ID: {0}".format(device_id))
if __name__ == "__main__":
loop()