From 9f85b2193b761b3b862d1a0a88cf320095606471 Mon Sep 17 00:00:00 2001 From: Will Chavez Date: Tue, 13 Feb 2024 15:06:11 -0800 Subject: [PATCH] removed other file. --- generate_missing_icons_md.py | 50 ------------------------------------ 1 file changed, 50 deletions(-) delete mode 100644 generate_missing_icons_md.py diff --git a/generate_missing_icons_md.py b/generate_missing_icons_md.py deleted file mode 100644 index 800000f57c..0000000000 --- a/generate_missing_icons_md.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import re - -# Define the icon sizes and styles -icon_sizes = ["12", "16", "20", "24", "28", "32", "48"] -icon_styles = ["regular", "filled"] - -def check_missing_icons(): - missing_icons_dict = {} - for folder in os.listdir("assets"): - svg_dir = os.path.join("assets", folder, "SVG") - if os.path.exists(svg_dir): - icon_name = folder.lower().replace(" ", "_") - for style in icon_styles: - missing_sizes = [] - for size in icon_sizes: - filename = f"ic_fluent_{icon_name}_{size}_{style}.svg" - if not os.path.exists(os.path.join(svg_dir, filename)): - missing_sizes.append(size) - if missing_sizes: - missing_icons_dict.setdefault((folder, style), []).extend(missing_sizes) - - # Convert the dictionary into a list of tuples - missing_icons = [(icon_name, style, ", ".join(sizes)) for (icon_name, style), sizes in missing_icons_dict.items()] - return missing_icons - - -# Function to generate Markdown file listing missing icons -def generate_missing_icons_md(missing_icons): - # Sort the missing icons alphabetically by icon name - missing_icons.sort(key=lambda x: x[0]) - - with open("missing_icons.md", "w") as md_file: - md_file.write("\n") - md_file.write("# Missing Sizes and Styles\n\n") - md_file.write("| Icon Name | Style | Size |\n") - md_file.write("|-----------|-------|------|\n") - for item in missing_icons: - if len(item) == 3: - md_file.write(f"| {item[0]} | {item[1].title()} | {item[2]} |\n") - - - -# Main function -def main(): - missing_icons = check_missing_icons() - generate_missing_icons_md(missing_icons) - -if __name__ == "__main__": - main()