fix documentation FileInputReader

This commit is contained in:
Hans Erik van Elburg 2019-12-16 15:41:24 +01:00
parent 43500e6bc2
commit 2d4b0d8e72

View File

@ -77,7 +77,7 @@ class FileInputReader(object):
""" """
Filereader to read and parse raw telegram strings from stdin or files specified at the commandline Filereader to read and parse raw telegram strings from stdin or files specified at the commandline
and instantiate Telegram objects for each read telegram. and instantiate Telegram objects for each read telegram.
Usage: Usage python script "syphon_smartmeter_readings_stdin.py":
from dsmr_parser import telegram_specifications from dsmr_parser import telegram_specifications
from dsmr_parser.clients.filereader import FileInputReader from dsmr_parser.clients.filereader import FileInputReader
@ -90,6 +90,10 @@ class FileInputReader(object):
for telegram in fileinput_reader.read_as_object(): for telegram in fileinput_reader.read_as_object():
print(telegram) print(telegram)
Command line:
tail -f /data/smartmeter/readings.txt | python3 syphon_smartmeter_readings_stdin.py
""" """
def __init__(self, telegram_specification): def __init__(self, telegram_specification):