All checks were successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
"""
|
|
Script to create additional PNG icon sizes for better iOS compatibility
|
|
"""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
from PIL import Image
|
|
|
|
def create_icon_sizes():
|
|
static_dir = Path("/Users/wn/Workspace/home-automation/apps/ui/static")
|
|
|
|
# Sizes that iOS might need
|
|
sizes = [16, 32, 57, 60, 72, 76, 114, 120, 144, 152, 180]
|
|
|
|
# Create home icons
|
|
base_icon = Image.open(static_dir / "apple-touch-icon.png")
|
|
for size in sizes:
|
|
resized = base_icon.resize((size, size), Image.Resampling.LANCZOS)
|
|
resized.save(static_dir / f"apple-touch-icon-{size}x{size}.png")
|
|
print(f"Created apple-touch-icon-{size}x{size}.png")
|
|
|
|
# Create garage icons
|
|
garage_icon = Image.open(static_dir / "garage-icon.png")
|
|
for size in sizes:
|
|
resized = garage_icon.resize((size, size), Image.Resampling.LANCZOS)
|
|
resized.save(static_dir / f"garage-icon-{size}x{size}.png")
|
|
print(f"Created garage-icon-{size}x{size}.png")
|
|
|
|
if __name__ == "__main__":
|
|
create_icon_sizes() |