Output number of documents converted.
This commit is contained in:
parent
f5b71ce6e8
commit
0cb0f14ceb
@ -94,6 +94,7 @@ def convert_file(filepath):
|
|||||||
print("Writing {}...".format(newfilepath))
|
print("Writing {}...".format(newfilepath))
|
||||||
frontmatter.dump(post, newfilepath)
|
frontmatter.dump(post, newfilepath)
|
||||||
|
|
||||||
|
num_converted = 0
|
||||||
for root, dirs, files in os.walk(SRCDIR):
|
for root, dirs, files in os.walk(SRCDIR):
|
||||||
if root.split("/")[-1] in ["assets", "css", "images", "fonts", "javascripts", "_includes", "_layouts", SRCDIR]:
|
if root.split("/")[-1] in ["assets", "css", "images", "fonts", "javascripts", "_includes", "_layouts", SRCDIR]:
|
||||||
continue
|
continue
|
||||||
@ -102,3 +103,7 @@ for root, dirs, files in os.walk(SRCDIR):
|
|||||||
continue
|
continue
|
||||||
filepath = "{}/{}".format(root, f)
|
filepath = "{}/{}".format(root, f)
|
||||||
convert_file(filepath)
|
convert_file(filepath)
|
||||||
|
num_converted += 1
|
||||||
|
|
||||||
|
print("Converted {} files.".format(num_converted))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user