Would you like me to try my hand at a PR to convert your basedirectory walk to a pathlib equivalent?
# iterate over files in the input directory
for subdir, dirs, files in os.walk(input_directory):
for file in files:
# file name with extension
file_name = os.path.basename(file)
read_file = subdir + '/' + file_name
# read Markdown file
text = frontmatter.load(read_file)
maybe something like:
from pathlib import Path
# iterate over files in the input directory
for file_path in Path(input_directory).rglob("*.*"): # or *.md ?
# read Markdown file
text = frontmatter.load(file_path)
Hi, thanks for the repo!
Would you like me to try my hand at a PR to convert your basedirectory walk to a pathlib equivalent?
maybe something like: