diff --git a/scripts/blog.py b/scripts/blog.py index b059065..65ad7e1 100644 --- a/scripts/blog.py +++ b/scripts/blog.py @@ -172,6 +172,7 @@ def load_all(top_dir_relative): docs = {} + count = 0 for root, dirs, files in os.walk(top): for name in files: if all([not name.endswith(ext) for ext in EXTENSIONS]): @@ -183,9 +184,12 @@ def load_all(top_dir_relative): doc, front_matter = read_markdown(path) out_path = get_out_path(front_matter) docs[path] = (doc, front_matter, out_path) + print('\rLoading posts... {}'.format(count), end='', flush=True) + count += 1 else: raise NotImplementedError('Unknown filetype: {}'.format(name)) + print(" [DONE]") return docs @@ -506,6 +510,7 @@ def main(source_top, dest_top): else: try: + print("Reloading: {}".format(filepath)) (doc, front_matter, out_path) = load_doc(filepath) except: logging.error(traceback.format_exc()) @@ -515,6 +520,7 @@ def main(source_top, dest_top): t0 = time.time() docs[filepath] = (doc, front_matter, out_path) doc_full_path = os.path.join(dest_top, out_path) + print("Updated: {}.html".format(doc_full_path)) os.makedirs(os.path.dirname(doc_full_path), exist_ok=True) # print("==", doc_full_path) with open(doc_full_path + '/index.html', 'wt') as f: