import os
import re
from collections import Counter

# Regex to extract resolution pattern like '4320x7680'
resolution_pattern = re.compile(r'(\d+)x(\d+)\.jpg$')

resolutions = []

# List all files in the current directory
for filename in os.listdir('.'):
    match = resolution_pattern.search(filename)
    if match:
        res = f"{match.group(1)}x{match.group(2)}"
        resolutions.append(res)

# Count and print results
unique_resolutions = set(resolutions)

print(f"Found {len(unique_resolutions)} unique resolutions:")
for res in sorted(unique_resolutions):
    print(f" - {res}")
