in scripts/copy_druid_docs.py [0:0]
def do_the_replace(file_path, druid_version):
for item in os.listdir(file_path):
item_path = os.path.join(file_path, item)
# If the item is a file and has a markdown extension
if os.path.isfile(item_path) and item_path.lower().endswith(".md"):
replace_text_in_file(item_path, druid_version)
# If the item is a file and has a markdownx extension
if os.path.isfile(item_path) and item_path.lower().endswith(".mdx"):
replace_text_in_file(item_path, druid_version)
# If the item is a directory, recursively process its contents
elif os.path.isdir(item_path):
do_the_replace(item_path, druid_version)