"""Count elements in downloaded examples; run beside the six SVG files."""
from pathlib import Path
import xml.etree.ElementTree as ET

for file in sorted(Path(__file__).resolve().parent.glob("*.svg")):
    tags = [node.tag.rsplit("}", 1)[-1] for node in ET.parse(file).iter()]
    print(f"{file.name}: paths={tags.count('path')}, rectangles={tags.count('rect')}, images={tags.count('image')}")
