INNER CODE UNIT · Python
main
Kotlin/kandy · util/kandy-samples-utils/update_ws_resources.py:54
def main():
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Update markdown file with resource tags for files in a directory.')
parser.add_argument('resources_dir', help='Path to the directory containing resource files')
parser.add_argument('md_file', help='Path to the markdown file to update')
args = parser.parse_args()
# Find all files in the resources directory
resource_files = find_all_files(args.resources_dir)
# Update the markdown file with resource tags
update_md_file(args.md_file, resource_files, args.resources_dir)
print(f"Updated {args.md_file} with {len(resource_files)} resource tags.")
if __name__ == "__main__":
main()