Files
Skripte/python/muell.py
T

30 lines
952 B
Python
Raw Permalink Normal View History

2022-01-07 14:53:50 +01:00
#!/usr/bin/python3
2021-04-30 12:46:06 +02:00
2026-09-19 11:50:37 +02:00
import argparse
2026-05-09 16:51:50 +02:00
from Muell import Muell
2021-05-07 15:23:01 +02:00
2021-06-23 16:17:11 +02:00
if __name__ == '__main__':
2026-09-19 11:50:37 +02:00
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(args.config)
2026-05-17 16:13:40 +02:00
ausgabe = muell.get_data()
2026-09-19 11:50:37 +02:00
if args.telegram == True:
muell.ausgabe_telegram(ausgabe)
if args.signal == True:
muell.ausgabe_signal(ausgabe)
if args.konsole == True:
muell.ausgabe_text(ausgabe)