From 99803d295cd31d6ca8e52247f4f4da08912e12a9 Mon Sep 17 00:00:00 2001 From: krady Date: Fri, 12 Jul 2024 15:07:28 -0500 Subject: [PATCH] integrating directory reader into main file --- src/alogamous/__main__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/alogamous/__main__.py b/src/alogamous/__main__.py index 36f3eae..c7c177c 100644 --- a/src/alogamous/__main__.py +++ b/src/alogamous/__main__.py @@ -1,12 +1,13 @@ -from alogamous import analyzer, echo_analyzer, error_counter_analyzer, line_count_analyzer +from alogamous import analyzer, directory_reader, echo_analyzer, error_counter_analyzer, line_count_analyzer -with open("../../data/ex_log_01.txt") as log_file, open("../../data/test_output_file.txt", "a") as output_file: +with open("../../data/test_output_file.txt", "a") as output_file: + reader = directory_reader.DirectoryReader("../../data") analyzer.analyze_log_stream( [ echo_analyzer.EchoAnalyzer(), error_counter_analyzer.ErrorCounterAnalyzer(), line_count_analyzer.LineCountAnalyzer(), ], - log_file, + reader.read(), output_file, )