From ffd9e152a8fda1404d494ad75001d68c0fcee05c Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Wed, 31 May 2023 18:38:21 +0300 Subject: [PATCH] add converted total posts converted log --- app/converter/converter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/converter/converter.py b/app/converter/converter.py index d7c43d8..a3efd2f 100644 --- a/app/converter/converter.py +++ b/app/converter/converter.py @@ -30,6 +30,7 @@ class Converter: self._jekyll_posts_path = configurator.source_path self._hugo_posts_path = configurator.output_path + self._logger.info("Converting posts, please wait") self._logger.info( f"Using source: {self._jekyll_posts_path} output: {self._hugo_posts_path}" ) @@ -44,6 +45,7 @@ class Converter: source_path = self._jekyll_posts_path output_path = Path(self._hugo_posts_path) _, _, files = next(os.walk(source_path)) + posts_converted_count = 0 for file in files: source_abs_path = source_path / Path(file) @@ -54,3 +56,6 @@ class Converter: file_reader, file_writer, ) + posts_converted_count += 1 + + self._logger.info(f"Converted {posts_converted_count} posts! 🚀")