oursky / mockuphone.com

Apache License 2.0
2 stars 4 forks source link

Fix input filenames with dot `.` parsed incorrectly #70

Closed pkong-ds closed 2 weeks ago

pkong-ds commented 2 weeks ago

ref #69

Problem

Previously, filename parsing method is implemented with custom code like split('.') instead of os.path.splitext()

Solution

Use os.path.splitext instead

Test run

Input

Simulator Screenshot - iPhone 15 Pro Max - 2024-06-15 at 20.53.15 Simulator Screenshot - iPhone 15 Pro Max - 2024-06-15 at 20.53.29
Simulator Screenshot - iPhone 15 Pro Max - 2024-06-15 at 20 53 15 Simulator Screenshot - iPhone 15 Pro Max - 2024-06-15 at 20 53 29

Output

apple-iphone-15-black-mockup(2).zip