Files
max-messages-forwarder/bridge.py
n08i40k c12beb95e2
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 4m50s
feat: initial commit
2025-11-01 03:10:21 +04:00

30 lines
677 B
Python

#!/usr/bin/env python3
"""Bridge messages from a Max group chat to a Telegram group using bot tokens."""
from __future__ import annotations
import asyncio
import logging
from bridge_app import parse_args, run_bridge
def configure_logging(debug: bool) -> None:
level = logging.DEBUG if debug else logging.INFO
logging.basicConfig(
level=level,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)
def main() -> None:
config, list_chats, debug = parse_args()
configure_logging(debug)
try:
asyncio.run(run_bridge(config, list_chats))
except KeyboardInterrupt:
pass
if __name__ == "__main__":
main()