import re import argparse def set_opacity(input_file, output_file): """ Replace all occurrences of 'fill-opacity:1' with 'fill-opacity:0', except when preceded by 'fill:#ffffc2'. :param input_file: Path to the input SVG file. :param output_file: Path to save the modified SVG file. """ try: # Read the content of the input SVG file with open(input_file, 'r') as file: svg_content = file.read() # Regex to match 'fill-opacity:1' and not preceded by 'fill:#ffffc2' pattern = r'(?