From 0cb0f14ceb48256a24c6f5a376a38f3987bf2b61 Mon Sep 17 00:00:00 2001 From: Markus Birth <130302+mbirth@users.noreply.github.com> Date: Tue, 27 Jul 2021 12:45:01 +0200 Subject: [PATCH] Output number of documents converted. --- jekyll2grav.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jekyll2grav.py b/jekyll2grav.py index ef4cb5f..38e9eb5 100755 --- a/jekyll2grav.py +++ b/jekyll2grav.py @@ -94,6 +94,7 @@ def convert_file(filepath): print("Writing {}...".format(newfilepath)) frontmatter.dump(post, newfilepath) +num_converted = 0 for root, dirs, files in os.walk(SRCDIR): if root.split("/")[-1] in ["assets", "css", "images", "fonts", "javascripts", "_includes", "_layouts", SRCDIR]: continue @@ -102,3 +103,7 @@ for root, dirs, files in os.walk(SRCDIR): continue filepath = "{}/{}".format(root, f) convert_file(filepath) + num_converted += 1 + +print("Converted {} files.".format(num_converted)) +