Files
Skripte/python/muell.py
T
2026-10-02 18:50:54 +02:00

30 lines
964 B
Python

#!/usr/bin/python3
import argparse
from Muell import Muell
if __name__ == '__main__':
parser = argparse.ArgumentParser(
prog='muell',
description='Benachrichtigt Empfänger über anstehende Müllabfuhr'
)
parser.add_argument('-c', '--config', default='.muell.yaml', help='Name der Konfigdatei. Diese muss sich im Benutzerverzeichnis befinden!')
parser.add_argument('-t', '--telegram', action='store_true', help='Ausgabe auf Telegram')
parser.add_argument('-s', '--signal', action='store_true', help='Ausgabe auf Signal')
parser.add_argument('-k', '--konsole', action='store_true', help='Ausgabe auf Konsole')
args = parser.parse_args()
muell = Muell(config_file=args.config)
ausgabe = muell.get_data()
if args.telegram == True:
muell.ausgabe_telegram(ausgabe)
if args.signal == True:
muell.ausgabe_signal(ausgabe)
if args.konsole == True:
muell.ausgabe_text(ausgabe)