# Icon Generator Script import os icons_dir = 'public/icons' os.makedirs(icons_dir, exist_ok=True) # Color scheme PRIMARY_COLOR = '#6366f1' SUCCESS_COLOR = '#22c55e' DANGER_COLOR = '#ef4444' def create_svg(filename, elements, color=PRIMARY_COLOR, fill=False): """Create an SVG icon file""" fill_attr = 'fill "{}"'.format(color) if fill else 'fill="none"' svg_content = ''' {} '''.format(fill_attr, color, '\n'.join(elements)) filepath = os.path.join(icons_dir, filename) with open(filepath, 'w', encoding='utf-8') as f: f.write(svg_content) print(f'Created: {filename}') # Home icon create_svg('home.svg', [ '', '' ]) # Search icon create_svg('search.svg', [ '', '' ]) # Settings icon create_svg('settings.svg', [ '', '' ]) # User icon create_svg('user.svg', [ '', '' ]) # Folder icon (filled) create_svg('folder.svg', [ '' ], fill=True) # File icon create_svg('file.svg', [ '', '' ]) # Download icon create_svg('download.svg', [ '', '', '' ]) # Upload icon create_svg('upload.svg', [ '', '', '' ]) # Share icon create_svg('share.svg', [ '', '', '', '', '' ]) # Favorite/Like icon (filled) create_svg('favorite.svg', [ '' ], fill=True) # Delete icon create_svg('delete.svg', [ '', '' ], color=DANGER_COLOR) # Edit icon create_svg('edit.svg', [ '', '' ]) # Add icon create_svg('add.svg', [ '', '', '' ]) # Back/Arrow Left icon create_svg('back.svg', [ '', '' ]) # More/Options icon (three dots) create_svg('more.svg', [ '', '', '' ], fill=True) # Cloud icon create_svg('cloud.svg', [ '' ]) # Drive/Server icon create_svg('drive.svg', [ '', '', '' ]) # Log/File Text icon create_svg('log.svg', [ '', '', '', '', '' ]) # Close icon create_svg('close.svg', [ '', '' ]) # Check/Verify icon create_svg('check.svg', [ '' ], color=SUCCESS_COLOR) # Play icon create_svg('play.svg', [ '' ], fill=True) # Pause icon create_svg('pause.svg', [ '', '' ]) # Eye icon create_svg('eye.svg', [ '', '' ]) # Eye Off icon create_svg('eye-off.svg', [ '', '' ]) print(f'\nTotal icons created: {len(os.listdir(icons_dir)) - 1}') # Exclude test.txt print('Icon generation complete!')