diff --git a/screenshots/models/screenshot_args.dart b/screenshots/models/screenshot_args.dart index 50307f8..c6ba68d 100644 --- a/screenshots/models/screenshot_args.dart +++ b/screenshots/models/screenshot_args.dart @@ -15,14 +15,14 @@ class ScreenshotArgs { required this.platformFolder, required this.backgroundColor, required this.isDark, - }) : deviceName = deviceName.replaceAll(' ', _pathArgsDelimited).toLowerCase(); + }) : deviceName = deviceName.replaceAll(' ', _pathArgsDelimited).replaceAll(RegExp('[(|)]'), '').toLowerCase(); ScreenshotArgs.fromRawName({ required String name, required String deviceName, required this.platformFolder, }) : name = name.split(_pathArgsDelimited)[1], - deviceName = deviceName.replaceAll(' ', _pathArgsDelimited).toLowerCase(), + deviceName = deviceName.replaceAll(' ', _pathArgsDelimited).replaceAll(RegExp('[(|)]'), '').toLowerCase(), backgroundColor = name.split(_pathArgsDelimited)[2], isDark = name.contains('dark'); diff --git a/screenshots/scripts/generate_ios_screenshots.sh b/screenshots/scripts/generate_ios_screenshots.sh index 5befaae..7f01393 100644 --- a/screenshots/scripts/generate_ios_screenshots.sh +++ b/screenshots/scripts/generate_ios_screenshots.sh @@ -1,13 +1,12 @@ -devices_array=("iPhone 8 Plus" "iPhone 13 Pro" "iPhone 13 Pro Max" "iPhone 15 Pro" "iPhone 15 Pro Max" "iPad Pro (12.9-inch) (6th generation)") - +simulators_array=("iPhone 13 Pro" "iPad Pro (12.9-inch) (6th generation)") open -a Simulator - -for i in "${devices_array[@]}"; do # https://www.baeldung.com/linux/shell-script-iterate-over-string-list#2-understanding--and--special-indices +for i in "${simulators_array[@]}"; do # https://www.baeldung.com/linux/shell-script-iterate-over-string-list#2-understanding--and--special-indices echo "$i" xcrun simctl boot "$i" - #uid=$(echo "$(fvm flutter devices)" | sed -n -r "s/$i \(mobile\) • (.*) • .* • .*\(simulator\)/\1/p") - #echo $uid sh screenshots/scripts/generate_screenshots.sh "$i" done - killall 'Simulator' + +# dart run screenshots/main.dart -p ios -d iphone_13_pro -l iphone55inch +# dart run screenshots/main.dart -p ios -d iphone_13_pro -l iphone65inch +# dart run screenshots/main.dart -p ios -d ipad_pro_12.9-inch_6th_generation -l ipad13inch