mirror of
https://github.com/alexgetmancom/miband-bot.git
synced 2026-07-17 01:00:45 +03:00
27 lines
574 B
Python
27 lines
574 B
Python
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# Copyright (C) 2026 Alexey
|
|
|
|
from __future__ import annotations
|
|
|
|
import asyncio
|
|
import sys
|
|
|
|
from miband_tracker.config import ConfigError, Settings
|
|
from miband_tracker.sync import daemon_main, run_sync
|
|
|
|
__all__ = ["run_sync"]
|
|
|
|
|
|
def main() -> None:
|
|
try:
|
|
exit_code = asyncio.run(daemon_main(Settings.from_env()))
|
|
except ConfigError as exc:
|
|
print(f"Config error: {exc}", file=sys.stderr, flush=True)
|
|
exit_code = 1
|
|
sys.exit(exit_code)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|